SHARE
TWEET

Untitled

a guest Oct 10th, 2015 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public final class EntitiesInterpolate extends Command<StateEntities> {
  2.         private final float alpha;
  3.         public EntitiesInterpolate(final float alpha) {
  4.                 super(StateEntities.class);
  5.                 this.alpha = alpha;
  6.         }
  7.         @Override
  8.         public void execute(StateEntities listener) {
  9.                 listener.interpolate(alpha);
  10.         }
  11. }
  12.  
  13. //Nope
  14. currentState.execute(new EntitiesInterpolate(accumulatedTime / SECONDS_PER_FRAME));
  15.  
  16.  
  17.  
  18. public final void execute(Command<StateComponent> command) {
  19.         if (hasComponent(command.getListeningClass())) {
  20.                 for (StateComponent component : components) {
  21.                         if (command.getListeningClass().isInstance(component)) {
  22.                                 command.execute(component);
  23.                         }
  24.                 }
  25.         }
  26. }
  27.  
  28.  
  29. public final class StateEntities extends StateComponent {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top