Пример #1
0
 private void Start()
 {
     m_Scene   = SceneManager.GetActiveScene();
     sceneName = m_Scene.name;
     if (sceneName == "dialogue1") //this resets the score to zero from the first narrative scene
     {
         Prefs = FindObjectOfType <playerprefs>();
         Prefs.resetPref();
         Debug.Log("resetPref called");
         Debug.Log(PlayerPrefs.GetInt("Magicrocks"));
     }
 }
Пример #2
0
 public void StartDialogue(dialogue dialogue) //when scene starts
 {
     Prefs = FindObjectOfType <playerprefs>();
     Prefs.resetPref();
     Debug.Log("resetPref called");
     Debug.Log(PlayerPrefs.GetInt("Magicrocks"));
     // continueButton.gameObject.SetActive(true);
     sentences.Clear();
     Debug.Log("Starting conversation");
     foreach (string sentence in dialogue.sentences)
     {
         sentences.Enqueue(sentence);
     }
     DisplayNextSentence();
 }