21 lines
531 B
C#
21 lines
531 B
C#
using UnityEngine;
|
|
|
|
public class EnemyAbility : Ability
|
|
{
|
|
[SerializeField] private float cooldownDelta;
|
|
[SerializeField] private bool willLookAtPlayer;
|
|
protected virtual void Start()
|
|
{
|
|
cooldown += Random.Range(-cooldownDelta, cooldownDelta);
|
|
currentCooldown = Random.Range(0, cooldown);
|
|
}
|
|
|
|
public override bool TryAbility()
|
|
{
|
|
if (willLookAtPlayer)
|
|
{
|
|
direction = WaveManager.instance.GetRandomPlayerPoint();
|
|
}
|
|
return base.TryAbility();
|
|
}
|
|
}
|