/// <summary>
        /// 获取流程。
        /// </summary>
        /// <typeparam name="T">要获取的流程类型。</typeparam>
        /// <returns>要获取的流程。</returns>
        public ProcedureBase GetProcedure <T>() where T : ProcedureBase
        {
            if (m_ProcedureFSM == null)
            {
                throw new Exception("You must initialize procedure first.");
            }

            return(m_ProcedureFSM.GetState <T>());
        }
Beispiel #2
0
 /// <summary>
 /// Retrieves a particular state
 /// </summary>
 /// <typeparam name="T">state type</typeparam>
 /// <returns><c>the state</c>, if state is available else <c>null</c></returns>
 public T GetState <T>() where T : IState
 {
     return(_fsm.GetState <T>());
 }