28 lines
660 B
C#
28 lines
660 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FireRateUpgrade : Upgrade
|
|
{
|
|
[SerializeField]private float[] fireRates;
|
|
public FireRateUpgrade(string name, float[] cost, float[] fireRate){
|
|
this.cost = cost;
|
|
this.upgradeName = name;
|
|
this.fireRates = fireRate;
|
|
}
|
|
|
|
public void SetFireRates(float[] nFireRate){
|
|
this.fireRates = nFireRate;
|
|
}
|
|
|
|
public float GetFireRate(){
|
|
return fireRates[lvlUnlocked-1];
|
|
}
|
|
|
|
public override void Activate(){
|
|
if(base.UpgradeAttempt()){
|
|
GameManager.Instance.UpgradeFireRate(this);
|
|
}
|
|
}
|
|
}
|