Bandidos
Public Member Functions | List of all members
com.mygdx.game.engine.entities.components.collision.CollisionEvent Class Reference
Inheritance diagram for com.mygdx.game.engine.entities.components.collision.CollisionEvent:
com.mygdx.game.engine.events.Event

Public Member Functions

 CollisionEvent (String type, Fixture myFixture, Fixture otherFixture, CollisionComponent otherCollisionComponent, Contact contactInfo)
 
Fixture getMyCollidedFixture ()
 
Fixture getOtherCollidedFixture ()
 
Contact getFullContactInfo ()
 
CollisionComponent getOtherCollisionComponent ()
 
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 and all extending events classes contain the information for collision. This Event type is triggered when a collision has occured.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ CollisionEvent()

com.mygdx.game.engine.entities.components.collision.CollisionEvent.CollisionEvent ( String  type,
Fixture  myFixture,
Fixture  otherFixture,
CollisionComponent  otherCollisionComponent,
Contact  contactInfo 
)
Parameters
typeof event which represents the collision type
myFixturethe collided fixture of dispatching class
otherFixturethe collided fixture of other collided class
otherCollisionComponentthe collision component of other collided class
contactInfothe full LibGdx contact info of the collision

Member Function Documentation

◆ clean()

void com.mygdx.game.engine.entities.components.collision.CollisionEvent.clean ( )

◆ getFullContactInfo()

Contact com.mygdx.game.engine.entities.components.collision.CollisionEvent.getFullContactInfo ( )

Returns the full LibGdx contact info of the collision

Returns
The Contact collision info

◆ getMyCollidedFixture()

Fixture com.mygdx.game.engine.entities.components.collision.CollisionEvent.getMyCollidedFixture ( )

Returns the collided fixture of dispatching class

Returns
the collided fixture.

◆ getOtherCollidedFixture()

Fixture com.mygdx.game.engine.entities.components.collision.CollisionEvent.getOtherCollidedFixture ( )

Returns the collided fixture of other collided class

Returns
the collided fixture.

◆ getOtherCollisionComponent()

CollisionComponent com.mygdx.game.engine.entities.components.collision.CollisionEvent.getOtherCollisionComponent ( )

Returns the collision component of other collided class With this you can access the parent of the component and check its tag for example.

Returns
The collision component linked to the collided fixture of the other class

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