using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName ="Finite State Machine/Condition/Look Around")] public class LookAroundCondition : Condition { protected override bool Test(FiniteStateMachine fsm) { ILookAround stalker = fsm.GetComponentInChildren<ILookAround>(); if (stalker != null) { return stalker.isObserving == fsm.target.gameObject; } else { return false; } } }