示例#1
0
        private bool _performExternalTransition(Dictionary <string, object> data)
        {
            if (targetState == null)
            {
                return(false);
            }
            StateMachine lca = _findLeastCommonAncestor();

            lca.switchState(sourceState, targetState, action, data);
            return(true);
        }
示例#2
0
        private bool _performLocalTransition(Dictionary <string, object> data)
        {
            if (targetState == null)
            {
                return(false);
            }
            if (!sourceState.hasAncestor(targetState) && !targetState.hasAncestor(sourceState))
            {
                return(false);
            }
            StateMachine lca = _findLeastCommonAncestor();
            Sub          containingSubState = lca.currentState as Sub;

            lca = containingSubState._submachine;
            lca.switchState(sourceState, targetState, action, data);
            return(true);
        }