An Entity class for some light-weight ECS behavior in Flixel
Constructor
new (?options:EntityOptions)
Creates a new Entity with given options
* @param options EntityOptions - {
* ?x:Float x position,
* ?y:Float y position,
* ?name:String Entity name,
* ?components:Array<Component> an array of components to be added to this Entity
* }
Methods
add_component (component:Component):Void
Add a component to this Entity
* @param component Component to be added to this entity
get_component (name:String):Null<Component>
Get component with name
* @param name component name
* @return Null<Component>
inlinehas_tag (tag:String):Bool
Checks whether or not this Entity has a tag
* @param tag tag name
* @return Bool
remove_component (name:String):Void
Remove a component from this Entity
* @param name the component's name