Package net.dermetfan.gdx.physics.box2d
Class WorldObserver.WorldChange
java.lang.Object
net.dermetfan.gdx.physics.box2d.WorldObserver.WorldChange
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
,WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
- Enclosing class:
- WorldObserver
public static class WorldObserver.WorldChange extends java.lang.Object implements WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
the changes of a
World
- Since:
- 0.6.0
-
Field Summary
Fields Modifier and Type Field Description java.lang.Boolean
newAutoClearForces
com.badlogic.gdx.math.Vector2
newGravity
-
Constructor Summary
Constructors Constructor Description WorldChange()
-
Method Summary
Modifier and Type Method Description void
apply(com.badlogic.gdx.physics.box2d.World world)
<C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>>
booleannewValuesEqual(C other)
if the values applied inWorldObserver.Change.apply(Object)
equalvoid
reset()
boolean
update(com.badlogic.gdx.physics.box2d.World world)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
newAutoClearForces
public java.lang.Boolean newAutoClearForces -
newGravity
public com.badlogic.gdx.math.Vector2 newGravity
-
-
Constructor Details
-
WorldChange
public WorldChange()
-
-
Method Details
-
update
public boolean update(com.badlogic.gdx.physics.box2d.World world)- Specified by:
update
in interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
- Parameters:
world
- the object to check for changes since the last time this method was called- Returns:
- if anything changed
-
apply
public void apply(com.badlogic.gdx.physics.box2d.World world)- Specified by:
apply
in interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
- Parameters:
world
- the object to apply the changes sinceWorldObserver.Change.update(Object)
to
-
newValuesEqual
public <C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>> boolean newValuesEqual(C other)Description copied from interface:WorldObserver.Change
if the values applied inWorldObserver.Change.apply(Object)
equal- Specified by:
newValuesEqual
in interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
-
reset
public void reset()- Specified by:
reset
in interfacecom.badlogic.gdx.utils.Pool.Poolable
-