Package net.dermetfan.gdx.physics.box2d
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)- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBreakable.Callback.AdapterReturns false in all methods implemented fromBreakable.Callback. - 
Method Summary
Modifier and Type Method Description booleandestroyed(com.badlogic.gdx.physics.box2d.Body body, Breakable breakable)called byBreakable.Manager.destroy(Body)booleandestroyed(com.badlogic.gdx.physics.box2d.Fixture fixture, Breakable breakable)called byBreakable.Manager.destroy(Fixture)booleandestroyed(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable)called byBreakable.Manager.destroy(Joint)booleanstrained(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)booleanstrained(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable, com.badlogic.gdx.math.Vector2 reactionForce, float reactionTorque)called byBreakable.Manager.strain(Joint, float) 
- 
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 fixturebreakable- the Breakable instance causing this callback to be calledcontact- the straining contactimpulse- the straining ContactImpulsenormalImpulse- the sum of the normal impulses of impulsetangentImpulse- 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)called byBreakable.Manager.strain(Joint, float)- Parameters:
 joint- the strainedJointbreakable- theBreakableinstance causing this callback to be calledreactionForce- thereaction force- Returns:
 - true to cancel the destruction if one was going to occur
 
 - 
destroyed
called byBreakable.Manager.destroy(Body)- Returns:
 - true to cancel the destruction
 
 - 
destroyed
called byBreakable.Manager.destroy(Fixture)- Returns:
 - true to cancel the destruction
 
 - 
destroyed
called byBreakable.Manager.destroy(Joint)- Returns:
 - true to cancel the destruction
 
 
 -