To have pieces animate when they move, follow these steps (for a game that is already setup with movement as explained here):
- Create an empty GameObject, call it MoveAnimation and attach it a Default Move Animator Creator
- Set the duration.
- Add the gameobject to the Move Animator field in the Grid Game Manager inspector on the GameBoard GameObject.
- Play and Test.
- More than one Animation can be created and added, to check what kind of animations you can implement look at the options on the Grid Game Manager Script’s Inspector on the GameBoard GameObject.
To check out this example:
- Import Abstract Strategy in a new project.
- Import the package below into the same project.
- Open the AnimatedPieces scene.