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