using UnityEngine; using Saltosion.OneWeapon.Utils; using Saltosion.OneWeapon.Player; using Saltosion.OneWeapon.Enemies; namespace Saltosion.OneWeapon.AI.Triggers { public class PlayerSighted : Trigger { public float Radius; public PlayerController Player { get; private set; } public override bool IsTriggered() { Player = Util.GetClosestTo(transform, Radius, true); return Player != null; } private void OnDrawGizmosSelected() { Gizmos.color = Color.green; Gizmos.DrawWireSphere(transform.position, Radius); } } }