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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface com.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 interface com.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 interface com.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 interface com.badlogic.gdx.physics.box2d.ContactListener