public static class WorldObserver.UnexpectedListener extends java.lang.Object implements WorldObserver.Listener
changed(Body, WorldObserver.BodyChange) can be predicted and therefore the other methods will be called normally.| Modifier and Type | Class and Description |
|---|---|
private static class |
WorldObserver.UnexpectedListener.ExpectationBase
Only for internal use.
|
WorldObserver.Listener.Adapter| Modifier and Type | Field and Description |
|---|---|
private com.badlogic.gdx.utils.ObjectMap<com.badlogic.gdx.physics.box2d.Body,WorldObserver.UnexpectedListener.ExpectationBase> |
bases
the ExpectationBases mapped to their Bodies
|
private WorldObserver.Listener |
listener
the Listener to notify
|
private com.badlogic.gdx.utils.Pool<WorldObserver.UnexpectedListener.ExpectationBase> |
pool
the Pool used by this UnexpectedListener
|
private float |
step
the last time step
|
| Constructor and Description |
|---|
UnexpectedListener(WorldObserver.Listener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
changed(com.badlogic.gdx.physics.box2d.Body body,
WorldObserver.BodyChange change) |
void |
changed(com.badlogic.gdx.physics.box2d.Fixture fixture,
WorldObserver.FixtureChange change) |
void |
changed(com.badlogic.gdx.physics.box2d.Joint joint,
WorldObserver.JointChange change) |
void |
changed(com.badlogic.gdx.physics.box2d.World world,
WorldObserver.WorldChange change) |
void |
created(com.badlogic.gdx.physics.box2d.Body body) |
void |
created(com.badlogic.gdx.physics.box2d.Fixture fixture) |
void |
created(com.badlogic.gdx.physics.box2d.Joint joint) |
void |
destroyed(com.badlogic.gdx.physics.box2d.Body body) |
void |
destroyed(com.badlogic.gdx.physics.box2d.Fixture fixture) |
void |
destroyed(com.badlogic.gdx.physics.box2d.Joint joint) |
WorldObserver.Listener |
getListener() |
void |
postUpdate(com.badlogic.gdx.physics.box2d.World world,
float step)
called at the very end of
WorldObserver.update(World, float) |
void |
preUpdate(com.badlogic.gdx.physics.box2d.World world,
float step)
called at the very beginning of
WorldObserver.update(World, float) |
void |
removedFrom(WorldObserver observer) |
void |
setListener(WorldObserver.Listener listener) |
void |
setOn(WorldObserver observer) |
private WorldObserver.Listener listener
private final com.badlogic.gdx.utils.ObjectMap<com.badlogic.gdx.physics.box2d.Body,WorldObserver.UnexpectedListener.ExpectationBase> bases
private final com.badlogic.gdx.utils.Pool<WorldObserver.UnexpectedListener.ExpectationBase> pool
private float step
public UnexpectedListener(WorldObserver.Listener listener)
listener - the listener to setpublic void changed(com.badlogic.gdx.physics.box2d.Body body,
WorldObserver.BodyChange change)
changed in interface WorldObserver.Listenerbody - the Body that changedchange - the changepublic void setOn(WorldObserver observer)
setOn in interface WorldObserver.Listenerobserver - the WorldObserver this Listener has just been set onpublic void removedFrom(WorldObserver observer)
removedFrom in interface WorldObserver.Listenerobserver - the WorldObserver this Listener has just been removed frompublic void preUpdate(com.badlogic.gdx.physics.box2d.World world,
float step)
WorldObserver.ListenerWorldObserver.update(World, float)preUpdate in interface WorldObserver.Listenerpublic void postUpdate(com.badlogic.gdx.physics.box2d.World world,
float step)
WorldObserver.ListenerWorldObserver.update(World, float)postUpdate in interface WorldObserver.Listenerpublic void changed(com.badlogic.gdx.physics.box2d.World world,
WorldObserver.WorldChange change)
changed in interface WorldObserver.Listenerworld - the World that changedchange - the changepublic void created(com.badlogic.gdx.physics.box2d.Body body)
created in interface WorldObserver.Listenerbody - the created Bodypublic void destroyed(com.badlogic.gdx.physics.box2d.Body body)
destroyed in interface WorldObserver.Listenerbody - the destroyed Bodypublic void changed(com.badlogic.gdx.physics.box2d.Fixture fixture,
WorldObserver.FixtureChange change)
changed in interface WorldObserver.Listenerfixture - the Fixture that changedchange - the changepublic void created(com.badlogic.gdx.physics.box2d.Fixture fixture)
created in interface WorldObserver.Listenerfixture - the created Fixturepublic void destroyed(com.badlogic.gdx.physics.box2d.Fixture fixture)
destroyed in interface WorldObserver.Listenerfixture - the destroyed Fixturepublic void changed(com.badlogic.gdx.physics.box2d.Joint joint,
WorldObserver.JointChange change)
changed in interface WorldObserver.Listenerjoint - the Joint that changedchange - the changepublic void created(com.badlogic.gdx.physics.box2d.Joint joint)
created in interface WorldObserver.Listenerjoint - the created Jointpublic void destroyed(com.badlogic.gdx.physics.box2d.Joint joint)
destroyed in interface WorldObserver.Listenerjoint - the destroyed Jointpublic WorldObserver.Listener getListener()
listenerpublic void setListener(WorldObserver.Listener listener)
listener - the listener to set