using System.Collections; using System.Collections.Generic; using UnityEngine; using MyCollections.AI.FinitStateMachine; [CreateAssetMenu(menuName = "Finite State Machine/Action/SetIdleTime")] public class SetIdleTime : Action { public override void Run(FSM fsm) { IdleState state = (IdleState)fsm.CurrentState(); Agent agent = fsm.Controller.Agent; state.generated = false; agent.agentStop = true; if (state != null) { state.timer = Random.Range(2f, 10f); Debug.Log($"TIMER IDLE: {state.timer}f"); } } }