Exemple #1
0
        public void AddFsmTranslation(FsmTranslation _trans)
        {
            if (AllFsmStates.ContainsKey(_trans.StateFrom.StateName) == false)
            {
                Debug.LogError("Miss  State From ");
                return;
            }
            if (AllFsmStates.ContainsKey(_trans.StateTo.StateName) == false)
            {
                Debug.LogError("Miss State To ");
                return;
            }

            Debug.Log("AddTrans " + _trans.StateFrom.StateName + "  " + _trans.StateTo.StateName);
            FsmState _StateFrom = AllFsmStates[_trans.StateFrom.StateName];
            FsmState _StateTo   = AllFsmStates[_trans.StateTo.StateName];

            _StateFrom.AddStateTranslation(_StateTo, _trans.Handler);
        }
Exemple #2
0
        public void AddFsmTranslation(FsmState _from, FsmState _to, StateTransHandler _handler)
        {
            FsmTranslation _translation = new FsmTranslation(_from, _to, _handler);

            AddFsmTranslation(_translation);
        }