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 void unitAttack(Canvas canvas, Unit attacker, Unit defender, CombatModel.CombatResultType result)
          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
equals, 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 where the animation should be drawn.
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,
                              CombatModel.CombatResultType result)
Animates a unit attack.

Parameters:
canvas - The canvas where the animation should be drawn.
attacker - an Unit value
defender - The defending unit.
result - a CombatResultType value