using MyCollections.AI.FinitStateMachine; using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(menuName = "Finite State Machine/Condition/IsTalking")] public class IsTalking : Condition { public override bool CheckCondition(FSM fsm) { InteractableNPC controller = fsm.Controller as InteractableNPC; if (controller != null) { if(controller.DialogueManager.CurrentStory != null) return true; return false; } Debug.LogError($"Controller is null: {nameof(InteractableNPC)}"); return false; } }