public void LevelUpUpdateChargers(CharacterLevel level) { characterLevel = level; float oldMax = chargesMax; chargesMax = Mathf.Floor(level.GetCost() / cost * 100); chargesCurrent += chargesMax - oldMax; }
protected void setCharges() { float costPost = 10; if(characterLevel != null) { costPost = characterLevel.GetCost(); } chargesMax = Mathf.Floor(costPost / cost * 100); chargesCurrent = chargesMax; nextChargesTillReload = chargesMax - loadSize; }