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

Classes

enum  ScoreGainType
 

Public Member Functions

 ScoreHolderComponent (ScoreGainType scoreGainType, int scoreWorth)
 
int getScoreWorth ()
 
ScoreGainType getScoreGainType ()
 
void setScoreWorth (int value)
 
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< ListenerItemgetAllListeners ()
 
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 ()
 

Detailed Description

This component can be added to an entity to represent it as something which can be used to gain score by the player

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ ScoreHolderComponent()

com.mygdx.game.score.ScoreHolderComponent.ScoreHolderComponent ( ScoreGainType  scoreGainType,
int  scoreWorth 
)

A score component has the have the following information to work with

Parameters
scoreGainTypeis what the component represents the gaining of score should be
scoreWorthis how much score this entity represents. (How much to gain after the action the type represents has been done)

Member Function Documentation

◆ activeStateChanged()

void com.mygdx.game.score.ScoreHolderComponent.activeStateChanged ( )
protected

◆ awake()

void com.mygdx.game.score.ScoreHolderComponent.awake ( )

◆ destroyed()

void com.mygdx.game.score.ScoreHolderComponent.destroyed ( )
protected

◆ getScoreGainType()

ScoreGainType com.mygdx.game.score.ScoreHolderComponent.getScoreGainType ( )

Returns the score gaining type of this entity

Returns
the score gaining type given in the constructor.

◆ getScoreWorth()

int com.mygdx.game.score.ScoreHolderComponent.getScoreWorth ( )

Returns the score value of this entity

Returns
the score worth given in the constructor as integer.

◆ setScoreWorth()

void com.mygdx.game.score.ScoreHolderComponent.setScoreWorth ( int  value)

Sets the score worth of this component.

Parameters
valueto set the score worth to.

◆ updated()

void com.mygdx.game.score.ScoreHolderComponent.updated ( float  deltaTime)
protected

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