fix upgrades
This commit is contained in:
parent
d8c49317a3
commit
5dcbd3c313
17 changed files with 477 additions and 83 deletions
|
|
@ -45,10 +45,14 @@ public class AbilityUIHandler : MonoBehaviour
|
|||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
foreach (AbilityManager.StoredUpgrade storedUpgrade in AbilityManager.instance.upgradesInventory)
|
||||
foreach (AbilityUpgrade upgrade in AbilityManager.instance.allUpgrades)
|
||||
{
|
||||
StoredAbilityUpgradeUI newUI = Instantiate(templateStoredUpgradeUI, upgradeGrid);
|
||||
newUI.SetUpgrade(storedUpgrade.upgrade, storedUpgrade.count);
|
||||
int upgradeCount = AbilityManager.instance.GetUpgradeCount(upgrade);
|
||||
if (upgradeCount > 0)
|
||||
{
|
||||
StoredAbilityUpgradeUI newUI = Instantiate(templateStoredUpgradeUI, upgradeGrid);
|
||||
newUI.SetUpgrade(upgrade, upgradeCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue