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>>
    boolean
    newValuesEqual​(C other)
    if the values applied in WorldObserver.Change.apply(Object) equal
    void 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 interface WorldObserver.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 interface WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
      Parameters:
      world - the object to apply the changes since WorldObserver.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 in WorldObserver.Change.apply(Object) equal
      Specified by:
      newValuesEqual in interface WorldObserver.Change<com.badlogic.gdx.physics.box2d.World>
    • reset

      public void reset()
      Specified by:
      reset in interface com.badlogic.gdx.utils.Pool.Poolable