示例#1
0
        public IEnumerator EndGameRoutine()
        {
            yield return(new WaitForSeconds(1f));

            GameOver.Get().Show();
            yield return(new WaitForSeconds(3f));

            PlayerData.Unload(); //Reload previous data
            SceneNav.RestartLevel();
        }
示例#2
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     if (coll.gameObject.GetComponent <PlayerCharacter>())
     {
         if (go_to_level != "")
         {
             SceneNav.GoToLevel(go_to_level, go_to_index);
         }
     }
 }
示例#3
0
        public void OnClickContinue()
        {
            PlayerData pdata = PlayerData.Get();

            if (!string.IsNullOrEmpty(pdata.current_scene))
            {
                if (!string.IsNullOrEmpty(pdata.current_checkpoint))
                {
                    SceneNav.GoToCheckpoint(pdata.current_scene, pdata.current_checkpoint);
                }
                else
                {
                    SceneNav.GoToLevel(pdata.current_scene, pdata.current_entry_index);
                }
            }
        }
示例#4
0
 void Start()
 {
     SceneNav.GoTo(SceneNav.load_scene);
 }
示例#5
0
 public void OnClickNew()
 {
     PlayerData.NewGame();
     PlayerData.Save(); //Overwrite existing game
     SceneNav.GoToLevel(first_level);
 }
示例#6
0
 public void Save()
 {
     PlayerData.Get().current_scene = SceneNav.GetCurrentScene();
     PlayerData.Save();
 }
示例#7
0
 public void OnClickQuit()
 {
     SceneNav.ExitToStart();
 }