public void GoToNextScene() { //_soul = PlayerPrefsHelper.GetSoul(); PlayerPrefsHelper.SaveSoul(Soul); //DEBUG CREATION //Instantiator.NewOverBlend(OverBlendType.StartLoadMidActionEnd, "YOUR NEW BODY AWAITS", 2.0f, OnToRaceChoiceScene); //DEBUG SELECTION Instantiator.NewOverBlend(OverBlendType.StartLoadMidActionEnd, "YOUR NEW BODY AWAITS", 2.0f, OnToCharacterSelectionScene); }
protected virtual void Exit() { Instantiator.NewPopupYesNo(Constants.YesNoTitle, "Are you sure you want to quit the game?" , Constants.Cancel, Constants.Proceed, OnAcceptExit); object OnAcceptExit(bool result) { if (result) { PlayerPrefsHelper.SaveSoul(Soul); Application.Quit(); } return(result); } }
private void Defeat(Character character) { Constants.InputLocked = true; Instantiator.NewOverTitle(string.Empty, "Sprites/MapTitle_3", AfterDefeat, Direction.Down); object AfterDefeat(bool result) { StartCoroutine(Helper.ExecuteAfterDelay(PlayerPrefsHelper.GetSpeed(), () => { Soul.Xp = character.TotalExperience + Soul.XpKept; Soul.XpKept = 0; PlayerPrefsHelper.SaveSoul(Soul); Instantiator.NewOverBlend(OverBlendType.StartLoadMidActionEnd, "SOUL TREE", 4.0f, TransitionDefeat, reverse: true); object TransitionDefeat(bool transResult) { NavigationService.NewRootScene(Constants.SoulTreeScene); Constants.InputLocked = false; return(transResult); } return(true); })); return(result); } }