With the animation and script complete, we can put the final touches on the Wacky Mole game:
- Duplicate the MolePosition (1) asset to create critters appropriate for your game area.
For our example, we made a total of nine moles. The following table identifies a simple 3x3 grid for nine moles. Obviously, there are countless layouts that could be used; we are just providing this arrangement because it defines the layout we used in Figure 8. 1. The Y position for each of the MolePosition assets is 0, but the remaining objects can be positioned using this chart:
Pos X = -0.3 |
Pos X = 0 |
Pos X = 0.3 |
|
Pos Z = 0.3 |
MolePosition (1) |
MolePosition (2) |
MolePosition (3) |
Pos Z = 0 |
MolePosition (4) |
MolePosition (5) |
MolePosition (6) |
Pos Z = -0.3 |
MolePosition (7) |
MolePosition (8) |
MolePosition (9) |
- Save the scene.
- Run the game to test the results.
- Hide the WackyMoles GameObject and unhide BottleSmash.