15 lines
417 B
C#
15 lines
417 B
C#
using Saltosion.OneWeapon.Utils;
|
|
using Saltosion.OneWeapon.Enemies;
|
|
|
|
namespace Saltosion.OneWeapon.AI.Triggers {
|
|
public class EnemySighted : Trigger {
|
|
public float Radius;
|
|
public Enemy ClosestEnemy { get; private set; }
|
|
|
|
public override bool IsTriggered() {
|
|
ClosestEnemy = Util.GetClosestTo<Enemy>(transform, Radius);
|
|
return ClosestEnemy != null;
|
|
}
|
|
}
|
|
}
|