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