Package com.deco2800.game.physics
Class PhysicsContactListener
java.lang.Object
com.deco2800.game.physics.PhysicsContactListener
- All Implemented Interfaces:
 ContactListener
public class PhysicsContactListener extends java.lang.Object implements ContactListener
Box2D collision events fire globally on the physics world, not per-object. The contact listener
 receives these events, finds the entities involved in the collision, and triggers events on them.
 
On contact start: evt = "collisionStart", params = (Fixture thisFixture, Fixture otherFixture)
 
On contact end: evt = "collisionEnd", params = (Fixture thisFixture, Fixture
 otherFixture)
- 
Constructor Summary
Constructors Constructor Description PhysicsContactListener() - 
Method Summary
Modifier and Type Method Description voidbeginContact(Contact contact)voidendContact(Contact contact)voidpostSolve(Contact contact, ContactImpulse impulse)voidpreSolve(Contact contact, Manifold oldManifold) 
- 
Constructor Details
- 
PhysicsContactListener
public PhysicsContactListener() 
 - 
 - 
Method Details
- 
beginContact
- Specified by:
 beginContactin interfaceContactListener
 - 
endContact
- Specified by:
 endContactin interfaceContactListener
 - 
preSolve
- Specified by:
 preSolvein interfaceContactListener
 - 
postSolve
- Specified by:
 postSolvein interfaceContactListener
 
 -