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