Class WorldContactListener
java.lang.Object
com.devcharles.piazzapanic.utility.box2d.WorldContactListener
- All Implemented Interfaces:
com.badlogic.gdx.physics.box2d.ContactListener
public class WorldContactListener
extends Object
implements com.badlogic.gdx.physics.box2d.ContactListener
Handles collision events, allows interactivity between the player and other objects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
beginContact
(com.badlogic.gdx.physics.box2d.Contact contact) Called when two fixtures begin to touch.private Pair<com.badlogic.ashley.core.Entity,
com.badlogic.ashley.core.Entity> customerInteractResolver
(com.badlogic.gdx.physics.box2d.Contact contact) void
endContact
(com.badlogic.gdx.physics.box2d.Contact contact) Called when two fixtures cease to touch.void
postSolve
(com.badlogic.gdx.physics.box2d.Contact contact, com.badlogic.gdx.physics.box2d.ContactImpulse impulse) void
preSolve
(com.badlogic.gdx.physics.box2d.Contact contact, com.badlogic.gdx.physics.box2d.Manifold oldManifold) private Pair<StationComponent,
com.badlogic.ashley.core.Entity> stationInteractResolver
(com.badlogic.gdx.physics.box2d.Contact contact)
-
Constructor Details
-
WorldContactListener
public WorldContactListener()
-
-
Method Details
-
beginContact
public void beginContact(com.badlogic.gdx.physics.box2d.Contact contact) Description copied from interface:com.badlogic.gdx.physics.box2d.ContactListener
Called when two fixtures begin to touch.- Specified by:
beginContact
in interfacecom.badlogic.gdx.physics.box2d.ContactListener
-
endContact
public void endContact(com.badlogic.gdx.physics.box2d.Contact contact) Description copied from interface:com.badlogic.gdx.physics.box2d.ContactListener
Called when two fixtures cease to touch.- Specified by:
endContact
in interfacecom.badlogic.gdx.physics.box2d.ContactListener
-
stationInteractResolver
private Pair<StationComponent,com.badlogic.ashley.core.Entity> stationInteractResolver(com.badlogic.gdx.physics.box2d.Contact contact) -
customerInteractResolver
private Pair<com.badlogic.ashley.core.Entity,com.badlogic.ashley.core.Entity> customerInteractResolver(com.badlogic.gdx.physics.box2d.Contact contact) -
preSolve
public void preSolve(com.badlogic.gdx.physics.box2d.Contact contact, com.badlogic.gdx.physics.box2d.Manifold oldManifold) - Specified by:
preSolve
in interfacecom.badlogic.gdx.physics.box2d.ContactListener
-
postSolve
public void postSolve(com.badlogic.gdx.physics.box2d.Contact contact, com.badlogic.gdx.physics.box2d.ContactImpulse impulse) - Specified by:
postSolve
in interfacecom.badlogic.gdx.physics.box2d.ContactListener
-