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