BloodAndGore/Assets/Scripts/AI/Triggers/PlayerSighted.cs
2019-08-04 18:35:28 +03:00

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;
}
}
}