final class UnitAttackAnimation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Unit |
attacker |
private Tile |
attackerTile |
private Unit |
defender |
private Tile |
defenderTile |
private FreeColClient |
freeColClient |
private boolean |
mirror |
private boolean |
success |
Constructor and Description |
---|
UnitAttackAnimation(FreeColClient freeColClient,
Unit attacker,
Unit defender,
Tile attackerTile,
Tile defenderTile,
boolean success)
Build a new attack animation.
|
Modifier and Type | Method and Description |
---|---|
void |
animate()
Do the animation.
|
private SimpleZippedAnimation |
getAnimation(java.lang.String startStr,
float scale,
Direction direction) |
private SimpleZippedAnimation |
getAnimation(Unit unit,
Direction direction)
Find the animation for a unit attack.
|
private final FreeColClient freeColClient
private final Unit attacker
private final Unit defender
private final Tile attackerTile
private final Tile defenderTile
private final boolean success
private boolean mirror
public UnitAttackAnimation(FreeColClient freeColClient, Unit attacker, Unit defender, Tile attackerTile, Tile defenderTile, boolean success)
freeColClient
- The enclosing FreeColClient
.attacker
- The Unit
that is attacking.defender
- The Unit
that is defending.attackerTile
- The Tile
the attack comes from.defenderTile
- The Tile
the attack goes to.success
- Does the attack succeed?private SimpleZippedAnimation getAnimation(java.lang.String startStr, float scale, Direction direction)
private SimpleZippedAnimation getAnimation(Unit unit, Direction direction)
unit
- The Unit
to animate.direction
- The Direction
of the attack.public void animate()