Пример #1
0
        private FsmBase GetFsm(string fullname)
        {
            FsmBase fsm = null;

            if (_fsms.TryGetValue(fullname, out fsm))
            {
                return(fsm);
            }
            return(null);
        }
Пример #2
0
        public FsmBase[] GetAllFsms()
        {
            int i    = 0;
            var fsms = new FsmBase[_fsms.Count];

            foreach (var item in _fsms)
            {
                fsms[i] = item.Value;
            }
            return(fsms);
        }
Пример #3
0
        private bool DestoryFsm(string fullName)
        {
            FsmBase fsm = null;

            if (_fsms.TryGetValue(fullName, out fsm))
            {
                fsm.ShutDown();
                return(_fsms.Remove(fullName));
            }
            return(false);
        }