Entity

Description

Type Entity
Method isActive:Byte (
)

Method getComponents:ObjectBag (
)

Method getWorld:World (
)

Method getEntityManager:EntityManager (
)

Method getId:Int (
)

Method getUniqueId:Long (
)

Method getTypeBits:Long (
)

Method getSystemBits:Long (
)

Method setUniqueId:Entity (
     uniqueId:Long
)

Method addTypeBit:Entity (
     bit:Long
)

Method setTypeBits:Entity (
     typeBits:Long
)

Method removeTypeBit:Entity (
     bit:Long
)

Method addSystemBit:Entity (
     bit:Long
)

Method setSystemBits:Entity (
     systemBits:Long
)

Method removeSystemBit:Entity (
     bit:Long
)

Method setTag:Entity (
     tagName:String
)

Method getTag:String (
)

Method refresh (
)

Method reset (
)

Method addComponent:Entity (
     c:EntityComponent
)

Method removeComponent (
     c:EntityComponent
)

Method removeComponentByType (
     t:ComponentType
)

Method removeComponentByName (
     typeName:String
)

Method hasComponent:Byte (
     t:ComponentType
)

Method getComponent:EntityComponent (
     t:ComponentType
)

Method getComponentByName:EntityComponent (
     name:String,
     required:Byte
)

Method setGroup:Entity (
     groupName:String
)

Method dumpComponents (
)

Method New (
)

End Type

A basic entity that exists in a game world. Consists of two identifiers: * ID : An id that may be re-used when the entity is destroyed * UniqueId : A unique ID that will not be re-used. Entities may also have a `Group` and `Tag`. Groups can contain more than one entity, but an entity may only belong to a single group at a time. Tags are unique string identifiers. An entity can only have a single tag, and that Tag must be unique to the entity. Entities must be created via world.createEntity so that their identifiers are set correctly.