Example #1
0
        internal bool HasSetElementFSM(Type type, FSMBase fsm)
        {
            if (!fsmSetDict.ContainsKey(type))
            {
                return(false);
            }
            var fsmPool = fsmSetDict[type];

            return(fsmPool.HasFSM(fsm));
        }
Example #2
0
        internal void DestoryFSMSet(Type type)
        {
            FSMBase fsm = null;

            if (fsmIndividualDict.TryGetValue(type, out fsm))
            {
                fsm.Shutdown();
                fsmIndividualDict.Remove(type);
            }
        }
        public void DestoryIndividualFSM(Type type)
        {
            FSMBase fsm = null;

            if (fsmIndividualDict.TryGetValue(type, out fsm))
            {
                fsm.Shutdown();
                fsmIndividualDict.TryRemove(type, out _);
            }
        }
        public void DestoryFSM(Type type)
        {
            FSMBase fsm = null;

            if (fsmDict.TryGetValue(type, out fsm))
            {
                fsm.Shutdown();
                fsmDict.Remove(type);
            }
        }
Example #5
0
 public void AddFSM(FSMBase fsm)
 {
     if (!fsmSet.Contains(fsm))
     {
         fsmSet.Add(fsm);
     }
     else
     {
         throw new ArgumentException(" FSM is exists" + fsm.OwnerType.ToString());
     }
 }
Example #6
0
 public void DestoryFSM(FSMBase fsm)
 {
     fsmSet.Remove(fsm);
     FsmRefreshHandler -= fsm.OnRefresh;
     fsm.Shutdown();
 }
Example #7
0
 public bool HasFSM(FSMBase fsm)
 {
     return(fsmSet.Contains(fsm));
 }
Example #8
0
 internal bool HasSetElementFSM <T>(FSMBase fsm)
     where T : class
 {
     return(HasSetElementFSM(typeof(T), fsm));
 }
Example #9
0
 public void DestoryFSM(FSMBase fsm)
 {
     fsmSet.Remove(fsm);
     fsm.Shutdown();
 }