net.sf.freecol.client.gui.animation
Class Animations

java.lang.Object
  extended by net.sf.freecol.client.gui.animation.Animations

public class Animations
extends java.lang.Object

A facade for animations.


Constructor Summary
Animations()
           
 
Method Summary
static int getAnimationSpeed(Canvas canvas, Unit unit)
          Common utility routine to retrieve animation speed.
static void unitAttack(Canvas canvas, Unit attacker, Unit defender, boolean success)
          Animates a unit attack.
static void unitMove(Canvas canvas, Unit unit, Tile source, Tile destination)
          Animates a unit move.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animations

public Animations()
Method Detail

unitMove

public static void unitMove(Canvas canvas,
                            Unit unit,
                            Tile source,
                            Tile destination)
Animates a unit move.

Parameters:
canvas - The Canvas to draw the animation on.
unit - The Unit to be animated.
source - The source Tile for the unit.
destination - The destination Tile for the unit.

unitAttack

public static void unitAttack(Canvas canvas,
                              Unit attacker,
                              Unit defender,
                              boolean success)
Animates a unit attack.

Parameters:
canvas - The Canvas to draw the animation on.
attacker - The Unit that is attacking.
defender - The Unit that is defending.
success - Did the attack succeed?

getAnimationSpeed

public static int getAnimationSpeed(Canvas canvas,
                                    Unit unit)
Common utility routine to retrieve animation speed.

Parameters:
canvas - The Canvas to draw the animation on.
unit - the Unit to be animated.
Returns:
The animation speed.