Exemple #1
0
 /// <summary>
 /// 获取被触发的状态
 /// </summary>
 /// <param name="trans"></param>
 /// <returns></returns>
 public FSMState <T> GetTriggeredState(FSMTranslation <T> trans)
 {
     if (triggerStateDict.ContainsKey(trans))
     {
         return(triggerStateDict[trans]);
     }
     return(null);
 }
Exemple #2
0
 public void RemoveTranslation(FSMTranslation <T> trans)
 {
     if (!triggerStateDict.ContainsKey(trans))
     {
         return;
     }
     triggerStateDict.Remove(trans);
     triggerList.Remove(trans);
 }
Exemple #3
0
 public void AddTranslation(FSMTranslation <T> trans, FSMState <T> state)
 {
     if (triggerStateDict.ContainsKey(trans))
     {
         return;
     }
     triggerStateDict.Add(trans, state);
     triggerList.Add(trans);
 }