示例#1
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     if (coll.gameObject.GetComponent <PlayerCharacter>())
     {
         if (go_to_level != "")
         {
             SceneNav.GoToLevel(go_to_level, go_to_index);
         }
     }
 }
示例#2
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);
                }
            }
        }
示例#3
0
 public void OnClickNew()
 {
     PlayerData.NewGame();
     PlayerData.Save(); //Overwrite existing game
     SceneNav.GoToLevel(first_level);
 }