Bandidos
Public Member Functions | List of all members
com.mygdx.game.hitRegistration.HitRegistrationEvent Class Reference
Inheritance diagram for com.mygdx.game.hitRegistration.HitRegistrationEvent:
com.mygdx.game.engine.events.Event

Public Member Functions

 HitRegistrationEvent (String type, float x, float y, BaseEntity hitEntity, int hitTool, int[] hitTypes)
 
float getRegistrationX ()
 
float getRegistrationY ()
 
BaseEntity getHitEntity ()
 
int getHitTool ()
 
int [] getHitTypes ()
 
void clean ()
 
- Public Member Functions inherited from com.mygdx.game.engine.events.Event
 Event (String type)
 
String getType ()
 
EventDispatcher getDispatcher ()
 
void setDispatcher (EventDispatcher dispatcherValue)
 
void clean ()
 

Detailed Description

This event represents a hit registration event and holds the entity which got hit, what kind of types the hit was and what the tool was which hit it.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ HitRegistrationEvent()

com.mygdx.game.hitRegistration.HitRegistrationEvent.HitRegistrationEvent ( String  type,
float  x,
float  y,
BaseEntity  hitEntity,
int  hitTool,
int []  hitTypes 
)

Repairs the event for launch.

Parameters
typeindicates the type of event
hitEntityis the entity which got hit
hitToolrepresents the object which hit the entity
hitTypesrepresents the types this hit was (Explosion, fire etc.)

Member Function Documentation

◆ clean()

void com.mygdx.game.hitRegistration.HitRegistrationEvent.clean ( )

◆ getHitEntity()

BaseEntity com.mygdx.game.hitRegistration.HitRegistrationEvent.getHitEntity ( )

Returns the hit entity instance

Returns
The Entity which was hit.

◆ getHitTool()

int com.mygdx.game.hitRegistration.HitRegistrationEvent.getHitTool ( )

Returns the tool which hit the entity

Returns
integer which represents the type of tool which was used

◆ getHitTypes()

int [] com.mygdx.game.hitRegistration.HitRegistrationEvent.getHitTypes ( )

Returns the hit types which hit the entity

Returns
integers which represent the types of hits which hit the entity

◆ getRegistrationX()

float com.mygdx.game.hitRegistration.HitRegistrationEvent.getRegistrationX ( )

Returns the x coordinate where the hit took place

Returns
The X

◆ getRegistrationY()

float com.mygdx.game.hitRegistration.HitRegistrationEvent.getRegistrationY ( )

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