Exemplo n.º 1
0
 public void changeState()
 {
     if (menuState == MenuState.mainMenu)
     {
         menuState = MenuState.storyMode;
         StartCoroutine(transitionScreen());
         music.clip = Resources.Load <AudioClip>("Louie Zong - Dive - 02 Sunlit Shallows");
         music.Play();
         player.toggleBook();
         player.toggleBook();
         customer.setChara();
         customer.enter.Play();
         // Debug.Log("change state");
     }
     else if (menuState == MenuState.scavengeMode)
     {
         StartCoroutine(transitionScreen());
         menuState = MenuState.storyMode;
         player.togglePlayer();
         player.toggleItem();
         music.clip = Resources.Load <AudioClip>("Louie Zong - Dive - 02 Sunlit Shallows");
         music.Play();
         door.Play();
     }
     else if (menuState == MenuState.storyMode)
     {
         StartCoroutine(transitionScreen());
         menuState = MenuState.scavengeMode;
         player.togglePlayer();
         player.closeEndModal();
         music.clip = Resources.Load <AudioClip>("Louie Zong - Sun - 02 The Glen");
         music.Play();
         door.Play();
     }
 }