<aside> ℹ️ Scripts(General) covers scripts used to manage the entire project. They can be found in the Project Directory, under the Assets folder.
The four scripts are the INPUT MANAGER, MAIN MENU, TOUCH CONTROLLER, and (not pictured below) SLIDESHOW CONTROLLER.
</aside>

This script is used on buttons to lead players throughout the different scenes in MedPets. It is attached to the SceneManager in each scene to direct users to other scenes.


(DOUBLE CLICK IMAGE TO ENLARGE)
This script only requires two things, an audio source and a scene title.
audioSource.Play() plays the specified audio source in the Scene Manager game object within a scene, as shown below. This means that when players move to different scenes, a button noise then plays.

the SceneManager.LoadScene(’TITLE OF SCENE’) is what takes the users to different scenes. These functions are assigned directly to the button as shown below. Ensuring that the button is correctly assigned, and that scene titles are spelled correctly and properly is of upmost importance.


The only different piece of scripting is in to the ToPuzzle function. This calls upon the NeedController script (found in the Pet —> Scripts folder), and it’s int variables of food, “happiness”, and energy. It depletes a random amount between 5 and 10 each time a game is played, to try and help regulate how often a player can actually play.
This script is used on in the Tutorial Scene to guide the players through the tutorial. Every time the next button is pressed, it cycles through an image array and presents the next picture as if a “slideshow” hence the title.
