// Start is called before the first frame update void OnEnable() { switch (tutorials) { case Tutorials.t1: if (PlayerPrefs.GetString(tutorials.ToString()) == "f") { gameObject.SetActive(false); } break; case Tutorials.t2: if (PlayerPrefs.GetString(tutorials.ToString()) == "f") { gameObject.SetActive(false); } break; case Tutorials.t3: if (PlayerPrefs.GetString(tutorials.ToString()) == "f") { gameObject.SetActive(false); } break; case Tutorials.t4: if (PlayerPrefs.GetString(tutorials.ToString()) == "f") { gameObject.SetActive(false); } break; } }
/// <summary> /// Get the correct video for a given tutorial. /// </summary> /// <param name="tutorial">The type of tutorial needed.</param> /// <returns>The video clip for the chosen tutorial.</returns> private VideoClip ChooseVideo(Tutorials tutorial) { if (tutorial == Tutorials.Intro) { return(introTutorial); } else if (tutorial == Tutorials.Full) { return(fullTutorial); } else if (tutorial == Tutorials.Move) { return(moveTutorial); } else if (tutorial == Tutorials.Fight) { return(fightTutorial); } else { Debug.Log("Trying to display a non-existent tutorial: " + tutorial.ToString()); return(fullTutorial); } }