Sorry for the newb lime questions.
I would like to add a new physics object to my level. Is object:new the correct function to use?
Would someone be able to give me a simple example of this function in action? Specifically, I am not sure what to provide as XML data. Is this data i reference from the Tile set?
Here’s what the documentation says:
Object:new (data, map, objectLayer) Create a new instance of an Object object. Parameters
- data: The XML data.
- map: The current Map object.
- objectLayer: The ObjectLayer the the Object resides on.
Return value: The newly created object instance.