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