Beispiel #1
0
        public void postEvent(FSMEvent evt)
        {
            string outs = "";

            for (int i = 0; i < currState_.Count; ++i)
            {
                outs += ":" + currState_[i].name;
            }

            Debug.Log(outs);


            for (int i = 0; i < this.currState_.Count; ++i)
            {
                State state = this.currState_[i] as State;
                if (debug_)
                {
                    Debug.Log("msg_post" + evt.msg + state.name);
                }
                string stateName = state.postEvent(evt) as string;
                if (stateName != "")
                {
                    this.translation(stateName);
                    break;
                }
            }
        }
Beispiel #2
0
 public void postEvent(FSMEvent evt)
 {
     for (int i = 0; i < this.currState_.Count; ++i)
     {
         State  state     = this.currState_[i] as State;
         string stateName = state.postEvent(evt) as string;
         if (stateName != "")
         {
             this.translation(stateName);
             break;
         }
     }
 }