Catching the monster
We have now come to the culmination of our scene: catching the monster. The monster can be hit by the ice balls, and the balls explode on impact, but nothing happens to the monster. If you recall, the player throws the ice balls at the monster in order to freeze them. What we will do then is add a script to slow down our monster with each ice ball hit, and when the monster is hit enough times, it will freeze. Perform the following directions to add and review the script:
- From the menu, select GameObject | UI | Canvas. This will add a new
Canvas
andEventSystem
objects to the scene. Delete theEventSystem
and rename theCanvas
Caught_UI
. Reparent theCaught_UI
object to theCatchScene
object. Select the
Caught_UI
object in the Hierarchy window, and from the menu, select GameObject | UI | Text. Rename the new Text objectFrozen
, and set the Rect Transform and Text component parameters in the Inspector window to match the following screenshot:The Frozen component settings...