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