Bandidos
|
Classes | |
enum | TweenStartType |
Public Member Functions | |
EngineTween | startTweenOnComponent (Tween tween, TweenStartType tweenStartType) |
Timeline | startTimelineOnComponent (Timeline timeline, boolean updateInGameTime) |
EngineTween | doFloat (TweenableFloat floatToTween, float newValue, float duration, TweenStartType tweenStartType) |
void | stopAllComponentTweens () |
void | initialize (BaseEntity parentEntity) |
BaseEntity | getParentOfComponent () |
boolean | isActive () |
boolean | isDestroyed () |
void | setActiveState (boolean activeState) |
void | destroy () |
void | update (float deltaTime) |
abstract void | awake () |
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 | updated (float deltaTime) |
abstract void | destroyed () |
abstract void | activeStateChanged () |
This class must be inherited by a class for it to be able to be added to Entities as component. It also cleans all its listeners when it is destroyed.
|
abstractprotected |
This will be called when the active state of the component has been changed.
|
abstract |
This will be called when the component is initialized
void com.mygdx.game.engine.entities.components.BaseEntityComponent.destroy | ( | ) |
Destroys the component. This will automatically be called when it is removed from its parent entity
|
abstractprotected |
This will be called when the component is about to be destroyed / removed from the parent entity
EngineTween com.mygdx.game.engine.entities.components.BaseEntityComponent.doFloat | ( | TweenableFloat | floatToTween, |
float | newValue, | ||
float | duration, | ||
TweenStartType | tweenStartType | ||
) |
BaseEntity com.mygdx.game.engine.entities.components.BaseEntityComponent.getParentOfComponent | ( | ) |
Returns the parent of the component given in the 'initialize' method
void com.mygdx.game.engine.entities.components.BaseEntityComponent.initialize | ( | BaseEntity | parentEntity | ) |
Initializes the component to set its correct properties. This method can only be called once.
parentEntity | of the component. (To which entity the component is attached to) |
boolean com.mygdx.game.engine.entities.components.BaseEntityComponent.isActive | ( | ) |
Returns if the component is active or not active. When it is not active, the component will not be updated and other functionalities can also be turned off
boolean com.mygdx.game.engine.entities.components.BaseEntityComponent.isDestroyed | ( | ) |
Returns if this component has been destroyed
void com.mygdx.game.engine.entities.components.BaseEntityComponent.setActiveState | ( | boolean | activeState | ) |
Timeline com.mygdx.game.engine.entities.components.BaseEntityComponent.startTimelineOnComponent | ( | Timeline | timeline, |
boolean | updateInGameTime | ||
) |
Starts a timeline on this component which will be ended automatically when this component is destroyed
timeline | to start on component |
updateInGameTime | if true, the speed will be affected by the Engine.TimeScale, if false, it will run on real time seconds |
EngineTween com.mygdx.game.engine.entities.components.BaseEntityComponent.startTweenOnComponent | ( | Tween | tween, |
TweenStartType | tweenStartType | ||
) |
Starts a tween on this component which will be ended automatically when this component is destroyed.
tween | to start on component |
updateInGameTime | if true, the speed will be affected by the Engine.TimeScale, if false, it will run on real time seconds |
void com.mygdx.game.engine.entities.components.BaseEntityComponent.stopAllComponentTweens | ( | ) |
Stops all the tweens & TimeLines started on this component.
void com.mygdx.game.engine.entities.components.BaseEntityComponent.update | ( | float | deltaTime | ) |
|
abstractprotected |
This will be called every frame for as long as the component is attached to the entity.
deltaTime | of how much time passed between this frame and the last. |