コード例 #1
0
ファイル: FSM.cs プロジェクト: lzxkulou/GDGeek
        public void postEvent(FSMEvent evt)
        {
            string outs = "";

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

            //			Debug.LogWarning (outs);


            for (int i = 0; i < this.currState_.Count; ++i)
            {
                StateBase state = this.currState_[i] as StateBase;
                if (debug_)
                {
                    Debug.Log("msg_post" + evt.msg + state.name);
                }
                string stateName = state.postEvent(evt) as string;
                if (stateName != "")
                {
                    this.translation(stateName);
                    break;
                }
            }
        }
コード例 #2
0
ファイル: FSM.cs プロジェクト: baby2nana/DRY
        private void postEvent(FSMEvent evt)
        {
            for (int i = 0; i < this.currStates_.Count; i++)
            {
                StateBase state = this.currStates_[i];

                if (debug_)
                {
                    Debug.Log("msg_post" + evt.msg + "state_name" + state.name);
                }

                string stateName = state.postEvent(evt) as string;

                if (stateName != "")
                {
                    this.translation(stateName);
                    break;
                }
            }
        }