Bandidos
|
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 () |
This Event and all extending events classes contain the information for collision. This Event type is triggered when a collision has occured.
com.mygdx.game.engine.entities.components.collision.CollisionEvent.CollisionEvent | ( | String | type, |
Fixture | myFixture, | ||
Fixture | otherFixture, | ||
CollisionComponent | otherCollisionComponent, | ||
Contact | contactInfo | ||
) |
type | of event which represents the collision type |
myFixture | the collided fixture of dispatching class |
otherFixture | the collided fixture of other collided class |
otherCollisionComponent | the collision component of other collided class |
contactInfo | the full LibGdx contact info of the collision |
void com.mygdx.game.engine.entities.components.collision.CollisionEvent.clean | ( | ) |
Contact com.mygdx.game.engine.entities.components.collision.CollisionEvent.getFullContactInfo | ( | ) |
Returns the full LibGdx contact info of the collision
Fixture com.mygdx.game.engine.entities.components.collision.CollisionEvent.getMyCollidedFixture | ( | ) |
Returns the collided fixture of dispatching class
Fixture com.mygdx.game.engine.entities.components.collision.CollisionEvent.getOtherCollidedFixture | ( | ) |
Returns the collided fixture of other collided class
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.