Crash::Entity
Inherits EventHandler < Reference < Object
Constructors
Instance methods
Add a component to the entity.
@param component The component object to add. @param componentClass The class of the component. This is only necessary if the component extends another component class and you want the framework to treat the component as of the base class type. If not set, the class type is determined directly from the component.
@return A reference to the entity. This enables the chaining of calls to add, to make creating and configuring entities cleaner. e.g.
var entity : Entity = new Entity()
.add( new Position( 100, 200 )
.add( new Display( new PlayerClip() );
Get a component from the entity.
Does the entity have a component of a particular type.
@param componentClass The class of the component sought. @return true if the entity has a component of the type, false if not.