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

Classes

enum  EnemyState
 

Public Member Functions

 Enemy (Animations animations, float health, int baseScoreWorth, BaseEnemyAttackComponent attackComponentAdded, BaseEnemyAIComponent aiComponent)
 
EnemyState getEnemyState ()
 
int getAttackRange ()
 
void move (float x, float y, float movementSpeed, boolean idleAnimationWhenReached)
 
void stopAction (boolean playIdleAnimation)
 
void attack (HealthComponent hc)
 
void setEnemyState (EnemyState state, boolean setAnimation)
 
void onReceiveEvent (Event event)
 
- Public Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
 BaseEntity ()
 
TransformComponent getTransformComponent ()
 
boolean hasInstanceOfComponent (BaseEntityComponent componentInstance)
 
void addTag (String tag)
 
void removeTag (String tag)
 
boolean hasTag (String tag)
 
void update (float dt)
 
void render (RenderComponents renderComponents)
 
void destroy ()
 
boolean isDestroyed ()
 
- 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 awake ()
 
void updated (float dt)
 
void destroyed ()
 
void rendered (RenderComponents renderComponents)
 
- Protected Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity
abstract void awake ()
 
abstract void updated (float dt)
 
abstract void rendered (RenderComponents renderComponents)
 
abstract void destroyed ()
 

Detailed Description

This class is the holder of Enemy Data which is formed by the EnemyFactory

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ Enemy()

com.mygdx.game.entities.Enemy.Enemy ( Animations  animations,
float  health,
int  baseScoreWorth,
BaseEnemyAttackComponent  attackComponentAdded,
BaseEnemyAIComponent  aiComponent 
)

Member Function Documentation

◆ attack()

void com.mygdx.game.entities.Enemy.attack ( HealthComponent  hc)

◆ awake()

void com.mygdx.game.entities.Enemy.awake ( )
protected

◆ destroyed()

void com.mygdx.game.entities.Enemy.destroyed ( )
protected

◆ getAttackRange()

int com.mygdx.game.entities.Enemy.getAttackRange ( )

◆ getEnemyState()

EnemyState com.mygdx.game.entities.Enemy.getEnemyState ( )

◆ move()

void com.mygdx.game.entities.Enemy.move ( float  x,
float  y,
float  movementSpeed,
boolean  idleAnimationWhenReached 
)

◆ onReceiveEvent()

void com.mygdx.game.entities.Enemy.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.

◆ rendered()

void com.mygdx.game.entities.Enemy.rendered ( RenderComponents  renderComponents)
protected

◆ setEnemyState()

void com.mygdx.game.entities.Enemy.setEnemyState ( EnemyState  state,
boolean  setAnimation 
)

◆ stopAction()

void com.mygdx.game.entities.Enemy.stopAction ( boolean  playIdleAnimation)

◆ updated()

void com.mygdx.game.entities.Enemy.updated ( float  dt)
protected

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