Static class containing all animation methods
More...
Static class containing all animation methods
§ animate()
static void View.Animation.animate |
( |
Direction |
direction, |
|
|
Unit |
unit |
|
) |
| |
|
static |
Animate sprite to "walk" in the specified direction. This is done by cycling through 3 frames. For each direction, there is a frame with right foot forward, one with both at neutral, and one with left forward. The "walking" animation is done by cycling through the 3 frames.
- Parameters
-
direction | The direction the unit is moving in |
§ animateUnitPosition()
static void View.Animation.animateUnitPosition |
( |
Graph |
graph, |
|
|
Unit |
unit, |
|
|
Node |
node |
|
) |
| |
|
static |
Animates unit movement from current unit location to future unit location. Unit moves through the inbetween nodes obtained from pathing algorith by first moving horizontally, then vertically. For horizontally, the unit will move right if the future position is greater in the x direction, otherwise it will move left. For vertical, the unit will move down if future y position is greater then current, otherwise it will move up. animate is called to animate the walking from node to node, and the direction parameter in that call is determined by which direction the unit is moving.
- Parameters
-
graph | Graph of the map. |
unit | Unit to be animated. |
node | Node to move to. |
§ attackAnimation()
static void View.Animation.attackAnimation |
( |
Direction |
direction, |
|
|
Unit |
unit |
|
) |
| |
|
static |
Animates attack of unit in specified direction. The animation consists of moving 10 pixels towards that direction, then moving back to original location. Upon execution, gameState isAnimating is set to true, and false after it is finished.
- Parameters
-
direction | The direction of the attack - can be Up, Down, Left, or Right |
unit | Unit to be animated. |
The documentation for this class was generated from the following file:
- C:/Users/Thien Trandinh/Documents/Blaze-Brigade/src/Blaze-Brigade/Blaze_Brigade/Animation.cs