Package net.dermetfan.gdx.physics.box2d
Class Breakable.Callback.Adapter
java.lang.Object
net.dermetfan.gdx.physics.box2d.Breakable.Callback.Adapter
- All Implemented Interfaces:
Breakable.Callback
- Enclosing interface:
- Breakable.Callback
public static class Breakable.Callback.Adapter extends java.lang.Object implements Breakable.Callback
Returns false in all methods implemented from
Breakable.Callback
. Instantiate this if you want to only use a subset of the methods of Breakable.Callback
.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dermetfan.gdx.physics.box2d.Breakable.Callback
Breakable.Callback.Adapter
-
Constructor Summary
Constructors Constructor Description Adapter()
-
Method Summary
Modifier and Type Method Description boolean
destroyed(com.badlogic.gdx.physics.box2d.Body body, Breakable breakable)
called byBreakable.Manager.destroy(Body)
boolean
destroyed(com.badlogic.gdx.physics.box2d.Fixture fixture, Breakable breakable)
called byBreakable.Manager.destroy(Fixture)
boolean
destroyed(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable)
called byBreakable.Manager.destroy(Joint)
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)
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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
strained
public 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)Description copied from interface:Breakable.Callback
- Specified by:
strained
in interfaceBreakable.Callback
- 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
public boolean strained(com.badlogic.gdx.physics.box2d.Joint joint, Breakable breakable, com.badlogic.gdx.math.Vector2 reactionForce, float reactionTorque)Description copied from interface:Breakable.Callback
called byBreakable.Manager.strain(Joint, float)
- Specified by:
strained
in interfaceBreakable.Callback
- Parameters:
joint
- the strainedJoint
breakable
- theBreakable
instance causing this callback to be calledreactionForce
- thereaction force
- Returns:
- true to cancel the destruction if one was going to occur
-
destroyed
Description copied from interface:Breakable.Callback
called byBreakable.Manager.destroy(Body)
- Specified by:
destroyed
in interfaceBreakable.Callback
- Returns:
- true to cancel the destruction
-
destroyed
Description copied from interface:Breakable.Callback
called byBreakable.Manager.destroy(Fixture)
- Specified by:
destroyed
in interfaceBreakable.Callback
- Returns:
- true to cancel the destruction
-
destroyed
Description copied from interface:Breakable.Callback
called byBreakable.Manager.destroy(Joint)
- Specified by:
destroyed
in interfaceBreakable.Callback
- Returns:
- true to cancel the destruction
-