2019-08-07 22:54:18 +02:00
|
|
|
using Saltosion.OneWeapon.Utils;
|
2019-08-14 16:17:48 +02:00
|
|
|
using Saltosion.OneWeapon.Enemies;
|
2019-08-03 17:36:17 +02:00
|
|
|
|
|
|
|
namespace Saltosion.OneWeapon.AI.Triggers {
|
|
|
|
public class EnemySighted : Trigger {
|
|
|
|
public float Radius;
|
|
|
|
public Enemy ClosestEnemy { get; private set; }
|
|
|
|
|
2019-08-14 18:05:41 +02:00
|
|
|
public override bool IsTriggered() {
|
2019-08-03 18:14:47 +02:00
|
|
|
ClosestEnemy = Util.GetClosestTo<Enemy>(transform, Radius);
|
|
|
|
return ClosestEnemy != null;
|
2019-08-03 17:36:17 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|