fix upgrades
This commit is contained in:
parent
d8c49317a3
commit
5dcbd3c313
17 changed files with 477 additions and 83 deletions
|
|
@ -12,6 +12,7 @@ public class Enemy : Entity
|
|||
public EnemyAbility ability;
|
||||
public float currentCooldown;
|
||||
}
|
||||
public static event Action OnDamaged;
|
||||
[Header("Targetting")]
|
||||
public Entity closestTarget;
|
||||
public float engagementRange;
|
||||
|
|
@ -112,6 +113,12 @@ public class Enemy : Entity
|
|||
}
|
||||
}
|
||||
|
||||
public override void TakeDamage(float damage)
|
||||
{
|
||||
base.TakeDamage(damage);
|
||||
OnDamaged?.Invoke();
|
||||
}
|
||||
|
||||
protected virtual void DropUpgrade(UpgradeDrop drop)
|
||||
{
|
||||
float random = Random.Range(0, 100);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue