using UnityEngine; using TMPro; public class Tutorial : MonoBehaviour { //Create variables and allow me to see them in the inspector public TextMeshProUGUI tutorialText; public GameObject tutorialArrow; public GameObject tutorialPanel; public GameObject tutorialDismissMessage; public GameObject player; bool tutorialActive = true; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { tutorialActive = true; //Enable the tutorial } // Update is called once per frame void Update() { if (tutorialActive) //Show the tutorial text, banner, and arrow, stop player movement { tutorialText.enabled = true; tutorialArrow.SetActive(true); tutorialPanel.SetActive(true); tutorialDismissMessage.SetActive(true); player.GetComponent().enabled = false; //Disable movement script so player can't move } if (tutorialActive = true && Input.GetMouseButtonDown(0)) //Click to disable tutorial { tutorialActive = false; tutorialText.enabled = false; tutorialArrow.SetActive(false); tutorialPanel.SetActive(false); tutorialDismissMessage.SetActive(false); player.GetComponent().enabled = true; //Enable player movement } } }