public IEnumerator EndGameRoutine() { yield return(new WaitForSeconds(1f)); GameOver.Get().Show(); yield return(new WaitForSeconds(3f)); PlayerData.Unload(); //Reload previous data SceneNav.RestartLevel(); }
void OnTriggerEnter2D(Collider2D coll) { if (coll.gameObject.GetComponent <PlayerCharacter>()) { if (go_to_level != "") { SceneNav.GoToLevel(go_to_level, go_to_index); } } }
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); } } }
void Start() { SceneNav.GoTo(SceneNav.load_scene); }
public void OnClickNew() { PlayerData.NewGame(); PlayerData.Save(); //Overwrite existing game SceneNav.GoToLevel(first_level); }
public void Save() { PlayerData.Get().current_scene = SceneNav.GetCurrentScene(); PlayerData.Save(); }
public void OnClickQuit() { SceneNav.ExitToStart(); }