public void DebugLevelUp() { if (hero != null) { hero.AddExperience(500020); } UpdateWindow(); }
public void OnConfirmClick() { if (selectedHero == null) { return; } int requiredExperience = Helpers.GetRequiredExperience(selectedLevel) - selectedHero.Experience; if (requiredExperience > GameManager.Instance.PlayerStats.ExpStock) { return; } GameManager.Instance.PlayerStats.ModifyExpStock(-requiredExperience); selectedHero.AddExperience(requiredExperience); SaveManager.CurrentSave.SaveHeroData(selectedHero); SaveManager.CurrentSave.SavePlayerData(); SaveManager.Save(); UpdateSliderValues(); UpdatePanels(); }