void OnEnable() { if (hadStarted) { StatWin.UpdateNums(); } }
public void calculate() { maxHealth = (int)(stats [STAT.CON] * (((stats [STAT.END] / 2.5f) + (stats [STAT.STR] / 5f)) * 2f)); maxMana = (int)(stats [STAT.WIS] * (((stats [STAT.INT] / 2.5f) + (stats [STAT.AGI] / 5f)) * 2f)); if (health > maxHealth) { health = maxHealth; } if (mana > maxMana) { mana = maxMana; } UpdateS(); if (StatWin.selfObj.activeSelf) { StatWin.UpdateNums(); } }