Esempio n. 1
0
    protected override void Update()
    {
        GetInput();
        GetLevel();
        LevelUp();
        levelText.text = MyLevel.ToString();
        CalculateShootAngles();

        base.Update();
    }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
    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());
        }
    }
Esempio n. 4
0
 public void UpdateLevel()
 {
     levelText.text = MyLevel.ToString();
 }
Esempio n. 5
0
 public void UpdateLevelText()
 {
     playerLevel.text = "Lv." + MyLevel.ToString();
 }