EntityLayer.addNonResourceEntity()
Type | function |
Library | wattageTileEngine.EntityLayer.* |
Return value | Number, SpriteInfo |
Keywords | |
See also |
Overview
This function adds display object directly to the layer. This is useful in cases where an entity needs to be added that the sprite resolver cannot resolve. The function will return an ID which can be used to reference the resource and the SpriteInfo for the entity.
Syntax
EntityLayer.addNonResourceEntity( displayObject )
displayObject (required)
String. Any display object.
Examples
local square = display.newRect(10, 10, 10, 10)
local id = entityLayerInstance.addNonResourceEntity(square)