protected override void Update() { GetInput(); GetLevel(); LevelUp(); levelText.text = MyLevel.ToString(); CalculateShootAngles(); base.Update(); }
public void SetDefaultValues() { MyGold = 1000; stamina = 50; intellect = 10; strength = 0; ResetStats(); MyXp.Initialize(0, Mathf.Floor(100 * MyLevel * Mathf.Pow(MyLevel, 0.5f))); levelText.text = MyLevel.ToString(); initPos = transform.parent.position; UIManager.MyInstance.UpdateStatsText(intellect, stamina, strength); }
private IEnumerator Ding() { while (!MyXp.IsFull) { yield return(null); } MyLevel++; ding.SetTrigger("Ding"); levelText.text = MyLevel.ToString(); MyXp.MyMaxValue = 100 * MyLevel * Mathf.Pow(MyLevel, 0.5f); MyXp.MyMaxValue = Mathf.Floor(MyXp.MyMaxValue); MyXp.MyCurrentValue = MyXp.MyOverflow; MyXp.Reset(); stamina += IncreaseBaseStat(); intellect += IncreaseBaseStat(); ResetStats(); if (MyXp.MyCurrentValue >= MyXp.MyMaxValue) { StartCoroutine(Ding()); } }
public void UpdateLevel() { levelText.text = MyLevel.ToString(); }
public void UpdateLevelText() { playerLevel.text = "Lv." + MyLevel.ToString(); }