public bool tryUpgrade(StatsEnum s, int c, string id) { inventoryUIScript.updateLootDisplay(playerManagerScript.money, playerManagerScript.loot); unitStatesDisplayScript.updateStates(); if (playerManagerScript.removeLoot(c, id)) { UnitScript currentUnit = unitStatesDisplayScript.currentUnit; switch (s) { case (StatsEnum.HP): currentUnit.Upgrade_HP(); break; case (StatsEnum.AC): currentUnit.Upgrade_AC(); break; case (StatsEnum.SPEED): currentUnit.Upgrade_Movement(); break; case (StatsEnum.TOHIT): currentUnit.Upgrade_AttackBonus(); break; case (StatsEnum.WEAPONDAMAGE): currentUnit.Upgrade_WeaponDamage(); break; case (StatsEnum.ABILITY): currentUnit.Upgrade_Ability(); break; } inventoryUIScript.updateLootDisplay(playerManagerScript.money, playerManagerScript.loot); unitStatesDisplayScript.updateStates(); return(true); } else { return(false); } }
public void updateLootDisplay() { inventoryUIScript.updateLootDisplay(money, loot); }