Bandidos
|
Public Member Functions | |
BaseEntity () | |
TransformComponent | getTransformComponent () |
boolean | hasInstanceOfComponent (BaseEntityComponent componentInstance) |
void | addTag (String tag) |
void | removeTag (String tag) |
boolean | hasTag (String tag) |
void | update (float dt) |
void | render (RenderComponents renderComponents) |
void | destroy () |
boolean | isDestroyed () |
Public Member Functions inherited from com.mygdx.game.engine.events.EventDispatcher | |
void | addEventListener (String type, IEventReceiver listeningClass) |
void | dispatchEvent (Event event) |
void | removeEventListener (String type, IEventReceiver listener) |
boolean | hasEventListener (String type) |
ArrayList< ListenerItem > | getAllListeners () |
void | destroyAllListeners () |
void | clean () |
Protected Member Functions | |
abstract void | awake () |
abstract void | updated (float dt) |
abstract void | rendered (RenderComponents renderComponents) |
abstract void | destroyed () |
This class must be extended to be part of the EntitySystem. It will allow the class to be found by tag, to be updated and to have EntityComponents.
com.mygdx.game.engine.entities.BaseEntity.BaseEntity | ( | ) |
void com.mygdx.game.engine.entities.BaseEntity.addTag | ( | String | tag | ) |
Adds a tag to the entity which can be used to be located by the 'EntitySystem' It will not be added if the tag is already on the entity.
tag | to attach to the entity. |
|
abstractprotected |
Is called when the Entity is instantiated.
void com.mygdx.game.engine.entities.BaseEntity.destroy | ( | ) |
This method will destroy the entity. This can also be done through the method EntitySystem.destroyEntity();
|
abstractprotected |
Will be called when the entity is in its final destroy phase
TransformComponent com.mygdx.game.engine.entities.BaseEntity.getTransformComponent | ( | ) |
Returns the automatically TransformComponent of the Entity
boolean com.mygdx.game.engine.entities.BaseEntity.hasInstanceOfComponent | ( | BaseEntityComponent | componentInstance | ) |
Checks whether the entity has the same instance of the component as the one given.
componentInstrance | to check |
boolean com.mygdx.game.engine.entities.BaseEntity.hasTag | ( | String | tag | ) |
Returns whether the entity has the given tag.
tag | to check |
boolean com.mygdx.game.engine.entities.BaseEntity.isDestroyed | ( | ) |
Returns true if this entity has been destroyed this frame, else false
void com.mygdx.game.engine.entities.BaseEntity.removeTag | ( | String | tag | ) |
Removes the given tag from the entity if it has it.
tag | to remove from entity |
void com.mygdx.game.engine.entities.BaseEntity.render | ( | RenderComponents | renderComponents | ) |
This method will be called every render update by the EntitySystem for as long as the entity is active.
renderComponents | which contains all the render information |
|
abstractprotected |
Is called every render update. This method can be used to draw things which are not entities. NOTE: This method will only be called if this entity has a RenderComponent attached to it!
renderComponents | which contains all the render informations |
void com.mygdx.game.engine.entities.BaseEntity.update | ( | float | dt | ) |
This method will be called every frame by the EntitySystem for as long as the entity is active.
dt | equals the delta time which has passed between the frames |
|
abstractprotected |
Will be called every frame for as long as the entity is active.
dt | equals the delta time which has passed between the frames |