net.sf.freecol.client.gui.animation
Class Animations
java.lang.Object
net.sf.freecol.client.gui.animation.Animations
public class Animations
- extends java.lang.Object
A facade for animations.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Animations
public Animations()
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 valuedefender - The defending unit.result - a CombatResultType value
getAnimation
private static SimpleZippedAnimation getAnimation(Canvas canvas,
Unit unit,
Map.Direction direction,
java.lang.String animation)