i believe my pc has been set ablaze
This commit is contained in:
parent
24ab1b213e
commit
c67146ea1a
10 changed files with 178 additions and 123 deletions
|
|
@ -62,7 +62,7 @@ public class AbilityManager : MonoBehaviour
|
|||
{
|
||||
upgradesInventory.Remove(upgrade);
|
||||
}
|
||||
ability.AddUpgrade(upgrade);
|
||||
ability.AddUpgrade(upgrade, 1);
|
||||
AbilityUIHandler.instance.UpdateInventory();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,18 +18,19 @@ public class AbilityUIHandler : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
instance = this;
|
||||
playerAbilityHandler = FindFirstObjectByType<MarisaAbilityHandler>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
[Header("Abilities")]
|
||||
public List<Button> uiObjects = new();
|
||||
[SerializeField] private MarisaAbilityHandler playerAbilityHandler;
|
||||
private MarisaAbilityHandler playerAbilityHandler;
|
||||
[SerializeField] private AbilityUIObject abilityUI;
|
||||
|
||||
[Header("Upgrades")]
|
||||
[SerializeField] private Transform upgradeGrid;
|
||||
[SerializeField] private StoredAbilityUpgradeUI templateStoredUpgradeUI;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
UpdateAbilitySelection();
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ public class PlayerAbility : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public void AddUpgrade(AbilityUpgrade upgrade)
|
||||
public void AddUpgrade(AbilityUpgrade upgrade, int amount)
|
||||
{
|
||||
if (!attachedUpgrades.ContainsKey(upgrade))
|
||||
{
|
||||
attachedUpgrades[upgrade] = 0;
|
||||
}
|
||||
attachedUpgrades[upgrade]++;
|
||||
attachedUpgrades[upgrade] += amount;
|
||||
upgrade.ApplyUpgrade(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue