creative-jam-20/Assets/Scripts/Upgrades/BulletsAmountUpgrade.cs
TheDaringDan 989f2ef6fc Enemies now have HP values
They give points on destruction
Points update on UI based on GameManager info
2022-05-15 11:28:52 -04:00

28 lines
646 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BulletsAmountUpgrade : Upgrade
{
[SerializeField]private int[] amounts;
public BulletsAmountUpgrade(string name, float[] cost, int[] amounts){
this.cost = cost;
this.upgradeName = name;
this.amounts = amounts;
}
public void SetBullets(int[] nAmounts){
this.amounts = nAmounts;
}
public int GetBullets(){
return amounts[lvlUnlocked-1];
}
public override void Activate(){
if(base.UpgradeAttempt()){
GameManager.Instance.UpgradeBullets(this);
}
}
}