Bandidos
|
Public Member Functions | |
PlayerWeaponControlComponent (IWeapon weaponControlling) | |
void | setWeaponControlling (IWeapon weapon) |
void | awake () |
void | onReceiveEvent (Event event) |
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 | onTouchEvent (TouchEvent event) |
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 allows a user to take control over an IWeapon using its touch input
com.mygdx.game.components.PlayerWeaponControlComponent.PlayerWeaponControlComponent | ( | IWeapon | weaponControlling | ) |
Sets the current weapon the player controls with its touch input
weapon | to control |
|
protected |
void com.mygdx.game.components.PlayerWeaponControlComponent.awake | ( | ) |
|
protected |
void com.mygdx.game.components.PlayerWeaponControlComponent.onReceiveEvent | ( | Event | event | ) |
This will be triggered when an event has been fired of type which this implementing class was listening to.
event | which has one of the event types which is listened to. |
Implements com.mygdx.game.engine.events.IEventReceiver.
|
protected |
Handles touch events in the 0 touch layer and controls the attached weapon with the information of the touch.
event | which has been received. |
void com.mygdx.game.components.PlayerWeaponControlComponent.setWeaponControlling | ( | IWeapon | weapon | ) |
Sets the current weapon the player controls with its touch input
weapon | to control |
|
protected |