public void UpdateScene()
 {
     if (startLoadTime == 0)
     {
         startLoadTime = getCurrentTimeSeconds();
     }
     if (scene_now != null && scene_now.loadfinished)
     {
         _scene_now.StateUpdate();
     }
     if (_scene_next != null && !_scene_next.loadfinished && getCurrentTimeSeconds() - startLoadTime > 1)   // 讀取
     {
         _scene_next.LoadScene().MoveNext();
         progress = _scene_next.progress;
         loading  = true;
         if (_scene_next.loadfinished)
         {
             //Debug.Log("Loading Finish");
         }
     }
     else
     {
         loading = false;
     }
     if (_scene_next != null && _scene_next.loadfinished)
     {
         if (immediately)
         {
             ChangeSceneState();
         }
     }
 }
Exemple #2
0
    IEnumerator IGameOver()
    {
        yield return(audioManager.PlayAndWait(audioSource, audioManager.GameOverAudio));

        int pops = StackHeight() - 1;

        for (int i = 0; i < pops; i++)
        {
            audioManager.Play(audioSource, audioManager.DropScoopAudio);
            Scoop scoop = scoopStack[scoopStack.Count - 1];
            scoopStack.RemoveAt(scoopStack.Count - 1);
            scoop.MeltScoop();
            yield return(new WaitForSeconds(.1f));
        }
        yield return(CrumbleCone());

        SceneState.LoadScene(0); // Reload game scene for debug purposes
    }
Exemple #3
0
 public void StartGame()
 {
     SceneState.LoadScene(1);
 }