Пример #1
0
        public MonoFSM <T> Initialize <T>(MonoBehaviour component) where T : struct, IConvertible, IComparable
        {
            var fsm = new MonoFSM <T>(this, component);

            stateMachineList.Add(fsm);
            return(fsm);
        }
Пример #2
0
 /// <summary>
 /// 创建MonoFSM状态机
 /// </summary>
 /// <typeparam name="T">状态枚举</typeparam>
 /// <param name="t_RunnerComponent">运行持有者的组件,用于反射里面状态对应的方法</param>
 /// <returns></returns>
 public IMonoFSM <T> CreateMonoFSM <T>(MonoBehaviour t_RunnerComponent) where T : struct, IConvertible, IComparable
 {
     return(MonoFSM <T> .Init(t_RunnerComponent, default(T)));
 }