Bandidos
|
Public Member Functions | |
float | getLocalPositionX () |
float | getLocalPositionY () |
float | getLocalRotation () |
float | getLocalScaleX () |
float | getLocalScaleY () |
float | getPositionX () |
float | getPositionY () |
float | getRotation () |
float | getScaleX () |
float | getScaleY () |
TransformComponent [] | getChilderen () |
TransformComponent | getParent () |
void | setParent (TransformComponent parent) |
Vector2 | getUpwards () |
Vector2 | getRight () |
void | translatePosition (float xDelta, float yDelta) |
void | translateRotation (float deltaRotation) |
void | translateScale (float deltaX, float deltaY) |
EngineTween | doPosition (float x, float y, float duration, TweenStartType tweenStartType) |
EngineTween | doRotation (float degrees, float duration, boolean shortestRotation, TweenStartType tweenStartType) |
EngineTween | doScale (float x, float y, float duration, TweenStartType tweenStartType) |
void | lookAt (Vector2 posToLookAt, float percentageTowardsLocation) |
void | setPosition (Vector2 newPosValue) |
void | setPosition (float newPosX, float newPosY) |
void | setRotation (float angleInDeg) |
void | setScale (float scaleX, float scaleY) |
void | awake () |
Public Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent | |
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 | |
void | updated (float deltaTime) |
void | destroyed () |
void | activeStateChanged () |
Protected Member Functions inherited from com.mygdx.game.engine.entities.components.BaseEntityComponent | |
abstract void | updated (float deltaTime) |
abstract void | destroyed () |
abstract void | activeStateChanged () |
This component contains the orientation information of the entity it is attached to. (Position, Rotation, Scale)
|
protected |
void com.mygdx.game.engine.entities.components.TransformComponent.awake | ( | ) |
|
protected |
EngineTween com.mygdx.game.engine.entities.components.TransformComponent.doPosition | ( | float | x, |
float | y, | ||
float | duration, | ||
TweenStartType | tweenStartType | ||
) |
Tweens the entity to the given position in the given duration. The Tween can still be modified by the return value The Tween will be updated in the Component channel. (EngineTweener)
x | Position to tween to |
y | Position to tween to |
duration | in seconds on how long to take until reaching the position. |
gameTime | means, when set to true, this tween will be effected by the Time Scale of the game, else it will not (False recommended for UI elements) |
EngineTween com.mygdx.game.engine.entities.components.TransformComponent.doRotation | ( | float | degrees, |
float | duration, | ||
boolean | shortestRotation, | ||
TweenStartType | tweenStartType | ||
) |
Tweens the entity to the given rotation in the given duration. The Tween can still be modified by the return value The Tween will be updated in the Component channel. (EngineTweener)
degrees | To lerp to |
duration | in seconds on how long to take until reaching the rotation. |
shortestRotation | indicates whether it should take a long or a short turn when dealing with from 350 -> 10. True means rotating right and false means rotating left. |
gameTime | means, when set to true, this tween will be effected by the Time Scale of the game, else it will not (False recommended for UI elements) |
EngineTween com.mygdx.game.engine.entities.components.TransformComponent.doScale | ( | float | x, |
float | y, | ||
float | duration, | ||
TweenStartType | tweenStartType | ||
) |
Tweens the entity to the given scale in the given duration. The Tween can still be modified by the return value The Tween will be updated in the Component channel. (EngineTweener)
x | scale to tween to |
y | scale to tween to |
duration | in seconds on how long to take until reaching the scale. |
gameTime | means, when set to true, this tween will be effected by the Time Scale of the game, else it will not (False recommended for UI elements) |
TransformComponent [] com.mygdx.game.engine.entities.components.TransformComponent.getChilderen | ( | ) |
Returns all the childeren added to this TransformComponent
float com.mygdx.game.engine.entities.components.TransformComponent.getLocalPositionX | ( | ) |
Returns the X position of the entity in local (parent) space.
float com.mygdx.game.engine.entities.components.TransformComponent.getLocalPositionY | ( | ) |
Returns the Y position of the entity in local (parent) space.
float com.mygdx.game.engine.entities.components.TransformComponent.getLocalRotation | ( | ) |
Returns the rotation of the current entity in Degrees in local (parent) space.
float com.mygdx.game.engine.entities.components.TransformComponent.getLocalScaleX | ( | ) |
Returns the X Scale of the entity in local (parent) space.
float com.mygdx.game.engine.entities.components.TransformComponent.getLocalScaleY | ( | ) |
Returns the Y Scale of the entity in local (parent) space.
TransformComponent com.mygdx.game.engine.entities.components.TransformComponent.getParent | ( | ) |
Gets the parent for the position of this transform component
float com.mygdx.game.engine.entities.components.TransformComponent.getPositionX | ( | ) |
Returns the X position of the entity in world space.
float com.mygdx.game.engine.entities.components.TransformComponent.getPositionY | ( | ) |
Returns the Y position of the entity in world space.
Vector2 com.mygdx.game.engine.entities.components.TransformComponent.getRight | ( | ) |
Gets the Right vector of the current transform and its rotation
float com.mygdx.game.engine.entities.components.TransformComponent.getRotation | ( | ) |
Returns the rotation of the current entity in Degrees in world space.
float com.mygdx.game.engine.entities.components.TransformComponent.getScaleX | ( | ) |
Returns the X Scale of the entity in world space.
float com.mygdx.game.engine.entities.components.TransformComponent.getScaleY | ( | ) |
Returns the Y Scale of the entity in world space.
Vector2 com.mygdx.game.engine.entities.components.TransformComponent.getUpwards | ( | ) |
Gets the Upward vector of the current transform and its rotation
void com.mygdx.game.engine.entities.components.TransformComponent.lookAt | ( | Vector2 | posToLookAt, |
float | percentageTowardsLocation | ||
) |
Makes the Entity which this component is attached to change its angle to look at the given positionToLookAt
posToLookAt | which will be the target to turn towards |
percentageTowardsLocation | is a value between 0 and 1 with 1 being fully turned to the posToLookAt and 0 being not at all. |
void com.mygdx.game.engine.entities.components.TransformComponent.setParent | ( | TransformComponent | parent | ) |
Sets the parent for the position of this transform component
void com.mygdx.game.engine.entities.components.TransformComponent.setPosition | ( | Vector2 | newPosValue | ) |
Sets the position to a new value
newPosValue | overwriting the x and y position of the entity. |
void com.mygdx.game.engine.entities.components.TransformComponent.setPosition | ( | float | newPosX, |
float | newPosY | ||
) |
Sets the position to a new value
newPosX | overwriting the x position of the entity. |
newPosY | overwriting the y position of the entity. |
void com.mygdx.game.engine.entities.components.TransformComponent.setRotation | ( | float | angleInDeg | ) |
Sets the rotation to a new value in Degrees
angleInDeg | overwriting the angle of the entity in degrees. |
void com.mygdx.game.engine.entities.components.TransformComponent.setScale | ( | float | scaleX, |
float | scaleY | ||
) |
Sets the scale to a new value
newScaleValue | overwriting the x and y scale of the entity |
void com.mygdx.game.engine.entities.components.TransformComponent.translatePosition | ( | float | xDelta, |
float | yDelta | ||
) |
Moves the entity with the given delta amount
xDelta | to add to the current x position |
yDelta | to add to the current y position |
void com.mygdx.game.engine.entities.components.TransformComponent.translateRotation | ( | float | deltaRotation | ) |
Rotates the entity with the given delta amount
deltaRotation | to add to the current rotation |
void com.mygdx.game.engine.entities.components.TransformComponent.translateScale | ( | float | deltaX, |
float | deltaY | ||
) |
|
protected |