Bandidos
Public Member Functions | Protected Member Functions | List of all members
com.mygdx.game.components.PlayerWeaponControlComponent Class Reference
Inheritance diagram for com.mygdx.game.components.PlayerWeaponControlComponent:
com.mygdx.game.engine.entities.components.BaseEntityComponent com.mygdx.game.engine.events.IEventReceiver com.mygdx.game.engine.events.EventDispatcher

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< ListenerItemgetAllListeners ()
 
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 ()
 

Detailed Description

This component allows a user to take control over an IWeapon using its touch input

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ PlayerWeaponControlComponent()

com.mygdx.game.components.PlayerWeaponControlComponent.PlayerWeaponControlComponent ( IWeapon  weaponControlling)

Sets the current weapon the player controls with its touch input

Parameters
weaponto control

Member Function Documentation

◆ activeStateChanged()

void com.mygdx.game.components.PlayerWeaponControlComponent.activeStateChanged ( )
protected

◆ awake()

void com.mygdx.game.components.PlayerWeaponControlComponent.awake ( )

◆ destroyed()

void com.mygdx.game.components.PlayerWeaponControlComponent.destroyed ( )
protected

◆ onReceiveEvent()

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.

Parameters
eventwhich has one of the event types which is listened to.

Implements com.mygdx.game.engine.events.IEventReceiver.

◆ onTouchEvent()

void com.mygdx.game.components.PlayerWeaponControlComponent.onTouchEvent ( TouchEvent  event)
protected

Handles touch events in the 0 touch layer and controls the attached weapon with the information of the touch.

Parameters
eventwhich has been received.

◆ setWeaponControlling()

void com.mygdx.game.components.PlayerWeaponControlComponent.setWeaponControlling ( IWeapon  weapon)

Sets the current weapon the player controls with its touch input

Parameters
weaponto control

◆ updated()

void com.mygdx.game.components.PlayerWeaponControlComponent.updated ( float  deltaTime)
protected

The documentation for this class was generated from the following file: