using System.Collections; using System.Collections.Generic; using UnityEngine; // 基础的切换 state public class ActionSwitchState : ActionBase { StateController m_StateController; StateBase m_TargetState; public ActionSwitchState(StateController stateSystem, StateBase targetState) { m_StateController = stateSystem; m_TargetState = targetState; } public override void Execute() { m_StateController.SwitchToState(m_TargetState); } }