private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (TransitionBG != null)
         {
             TransitionBG.Play("TransitionFadeUp");
         }
         PlayerController.Instance.isControlled = false;
         sceneTools.LoadScene(sceneIndex, transitionTime);
     }
 }
 public void ExitButtonFunc()
 {
     isPause        = false;
     Time.timeScale = 1;
     SetPanelActive(false);
     if (TransitionBG != null)
     {
         TransitionBG.Play("TransitionFadeUp");
     }
     sceneTools.LoadScene(0, 1);
     if (bgmController != null)
     {
         Destroy(bgmController.gameObject, 1);
     }
 }
示例#3
0
    IEnumerator ReturnToStart()
    {
        yield return(new WaitForSeconds(23));

        sceneTools.LoadScene(0, 1);
    }