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
638 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DamageUpgrade : Upgrade
{
[SerializeField]private float[] damages;
public DamageUpgrade(string name, float[] cost, float[] damages){
this.cost = cost;
this.upgradeName = name;
this.damages = damages;
}
public void SetDamages(float[] nDamages){
this.damages = nDamages;
}
public float GetDamage(){
return damages[lvlUnlocked-1];
}
public override void Activate(){
if(base.UpgradeAttempt()){
GameManager.Instance.UpgradeDamage(this);
}
}
}