creative-jam-20/Assets/Scripts/Upgrades/BulletsAmountUpgrade.cs
2022-05-14 17:37:08 -04:00

28 lines
632 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()){
player.UpgradeBullets(this);
}
}
}