28 lines
646 B
C#
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);
|
|
}
|
|
}
|
|
}
|