Updating touch input
Now that we can manage our scene transitions through GameManager
, we now need to set the catalyst that triggers a scene change. For the Catch scene, that will be when the player taps on a monster they want to catch, which means we will need to isolate a touch input when it is on a monster. If you recall, our current touch controls work over the entire screen and the input only directs the camera. What we need to do is customize the touch input script to handle that monster touch. Fortunately, for brevity, those script changes were added as part of our last import. Perform the following instructions to configure the new script and review those changes:
- Open the Unity editor and load the Map scene.
- In the Hierarchy window, expand the
MapScene
object and select theDualTouchControls
object. Rename this objectUI_Input
in the Inspector window; this will be a more descriptive name to the function of this object.Tip
Renaming game objects, classes, scripts, or other components...