/// <summary> /// 切换状态 /// </summary> /// <param name="status">状态类型</param> /// <param name="beForce">是否强制切换</param> /// <returns>切换是否成功</returns> public bool ChangeStatus(E_BulletFsmStatus status, bool beForce = false, System.Action onCompelte = null, params object[] objs) { bool result = m_Fsm.ChangeStatus((int)status, beForce, objs); if (result) { CurStatus = status; var fsmStatus = m_Fsm.GetStatus((int)status); fsmStatus.OnComplete = onCompelte; } return(result); }
/// <summary> /// 检测是否可以切换到指定状态 /// </summary> /// <param name="targetStatus"></param> /// <param name="beForce"></param> /// <returns></returns> public bool CheckCanChangeStatus(E_BulletFsmStatus targetStatus, bool beForce = false) { return(m_Fsm.CheckCanChangeStatus((int)targetStatus, beForce)); }