Exemplo n.º 1
0
 @Override
 public String toString() {
   return "move {"
       + spriteWithLocation.toString()
       + "} to {"
       + newLocation.getLocation().toString()
       + "}";
 }
Exemplo n.º 2
0
 public void moveToFrame(double percentage) {
   SpriteLocation location =
       newLocation.getLocation().sub(oldLocation).multiply(percentage).add(oldLocation);
   spriteWithLocation.setLocation(location);
 }
Exemplo n.º 3
0
 public Animation(SpriteWithLocation spriteWithLocation, SpriteWithLocation newLocation) {
   this.spriteWithLocation = spriteWithLocation;
   this.newLocation = newLocation;
   this.oldLocation = spriteWithLocation.getLocation();
 }