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); } } }
public void OnClickNew() { PlayerData.NewGame(); PlayerData.Save(); //Overwrite existing game SceneNav.GoToLevel(first_level); }