Bandidos
|
Public Member Functions | |
Body | getBody () |
void | setBody (Body body) |
void | createFixture (FixtureDef fixDef, short _type) |
Vector2 | getVelocity () |
void | setVelocity (float xVelocity, float yVelocity) |
void | stopVelocity () |
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 information on what collision category the entity has and with what the entity can collide with.
|
protected |
void com.mygdx.game.engine.entities.components.collision.CollisionComponent.awake | ( | ) |
void com.mygdx.game.engine.entities.components.collision.CollisionComponent.createFixture | ( | FixtureDef | fixDef, |
short | _type | ||
) |
Creates and adds a fixture for this entity. A FixtureDef must be given so that multiple fixtures can be added to the entity. NOTE: A shape must be created first. This has to be given to the fixDef parameter.
fixDef |
|
protected |
Body com.mygdx.game.engine.entities.components.collision.CollisionComponent.getBody | ( | ) |
Returns the _body for this entity
Vector2 com.mygdx.game.engine.entities.components.collision.CollisionComponent.getVelocity | ( | ) |
Returns the velocity set with the setVelocity method. If both values are zero, no velocity was set.
void com.mygdx.game.engine.entities.components.collision.CollisionComponent.setBody | ( | Body | body | ) |
Sets the current body and puts the given fixtures to it.
body |
void com.mygdx.game.engine.entities.components.collision.CollisionComponent.setVelocity | ( | float | xVelocity, |
float | yVelocity | ||
) |
Sets the physics velocity of this object. (Should not be called in an update to work) This will turn off all set position handing and force its own position on rotation on the entity To regain control, the 'stopVelocity' method should be called
xVelocity | to give the entity |
yVelocity | to give the entity |
void com.mygdx.game.engine.entities.components.collision.CollisionComponent.stopVelocity | ( | ) |
This stops the entity of having physics velocity and gives it its control over its own position and rotation back.
|
protected |