internal void Start() { _tutorialText = GameObject.Find("Tutorial Text").GetComponent <Text>(); p = GameObject.Find("Player"); //start = GameObject.Find("Player").start Cheat CheatObj = GameObject.FindObjectOfType <Cheat>(); if (CheatObj.cheating) { ShowTutorial = false; } else { ShowTutorial = true; } wait = 3.0f; wait_long = 6.0f; UpdateText(); if (Player.hasGravityBoots) { _tutorialText.text = ""; gravity = true; _tutorialState = TutorialState1.DoneWithTutorial; } if (!gravity) { UpdateText(); } }
/// <summary> /// Called (internally or externally) whenever the Player does something that might be of interest to the tutorial. /// Changes state appropriately. /// </summary> /// <param name="action">The type of event that just happened</param> public void UserAction(TutorialState1 action) { if (action != _tutorialState) { return; // this action wasn't relevant at this particular time. } _tutorialState++; UpdateText(); }