Interface Breakable.Callback

All Known Implementing Classes:
Breakable.Callback.Adapter
Enclosing class:
Breakable

public static interface Breakable.Callback
a callback for a Breakable if its container (body or fixture) was destroyed (for example to play a sound)
  • Method Details

    • strained

      boolean strained​(com.badlogic.gdx.physics.box2d.Fixture fixture, Breakable breakable, com.badlogic.gdx.physics.box2d.Contact contact, com.badlogic.gdx.physics.box2d.ContactImpulse impulse, float normalImpulse, float tangentImpulse)
      Parameters:
      fixture - the strained fixture
      breakable - the Breakable instance causing this callback to be called
      contact - the straining contact
      impulse - the straining ContactImpulse
      normalImpulse - the sum of the normal impulses of impulse
      tangentImpulse - the sum of the tangent impulses of impulse
      Returns:
      true to cancel the destruction if one was going to occur
    • strained

      boolean strained​(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable, com.badlogic.gdx.math.Vector2 reactionForce, float reactionTorque)
      Parameters:
      joint - the strained Joint
      breakable - the Breakable instance causing this callback to be called
      reactionForce - the reaction force
      Returns:
      true to cancel the destruction if one was going to occur
    • destroyed

      boolean destroyed​(com.badlogic.gdx.physics.box2d.Body body, Breakable breakable)
      Returns:
      true to cancel the destruction
    • destroyed

      boolean destroyed​(com.badlogic.gdx.physics.box2d.Fixture fixture, Breakable breakable)
      Returns:
      true to cancel the destruction
    • destroyed

      boolean destroyed​(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable)
      Returns:
      true to cancel the destruction