Bandidos
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
com.mygdx.game.hitRegistration.HitRegistrationPoint Class Reference
Inheritance diagram for com.mygdx.game.hitRegistration.HitRegistrationPoint:
com.mygdx.game.engine.events.EventDispatcher

Public Member Functions

void register (float x, float y, BaseEntity hitEntity, int toolType, int[] hitTypes)
 
void register (float x, float y, BaseEntity hitEntity, int toolType, int hitType)
 
- 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 ()
 

Static Public Member Functions

static HitRegistrationPoint getInstance ()
 

Static Public Attributes

static final String HIT_REGISTRATED_EVENT = "HitRegistrationEvent"
 

Detailed Description

This class is a singleton where all the hits of the game should be registered to. This is the center-point where all hit events can be listened to by other classes.

Author
Ramses Di Perna

Member Function Documentation

◆ getInstance()

static HitRegistrationPoint com.mygdx.game.hitRegistration.HitRegistrationPoint.getInstance ( )
static

◆ register() [1/2]

void com.mygdx.game.hitRegistration.HitRegistrationPoint.register ( float  x,
float  y,
BaseEntity  hitEntity,
int  toolType,
int []  hitTypes 
)

This registers a hit which dispatches the HIT_REGISTRATED_EVENT type event which other classes can listen to.

Parameters
hitEntityis the entity which was hit. (This may be set as 'null' if you want to call a ground hit for example)
toolTypeindicates the object which hit the entity (Check HitGlobals for all the tools)
hitTypesindicates the types of hits these presented (Explosion, Fire etc) (Check HitGlobals for all the types)

◆ register() [2/2]

void com.mygdx.game.hitRegistration.HitRegistrationPoint.register ( float  x,
float  y,
BaseEntity  hitEntity,
int  toolType,
int  hitType 
)

This registers a hit which dispatches the HIT_REGISTRATED_EVENT type event which other classes can listen to.

Parameters
hitEntityis the entity which was hit. (This may be set as 'null' if you want to call a ground hit for example)
toolTypeindicates the object which hit the entity (Check HitGlobals for all the tools)
hitTypeindicates the type of hit this presented (Explosion, Fire etc) (Check HitGlobals for all the types)

Member Data Documentation

◆ HIT_REGISTRATED_EVENT

final String com.mygdx.game.hitRegistration.HitRegistrationPoint.HIT_REGISTRATED_EVENT = "HitRegistrationEvent"
static

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