private bool _performExternalTransition(Dictionary <string, object> data) { if (targetState == null) { return(false); } StateMachine lca = _findLeastCommonAncestor(); lca.switchState(sourceState, targetState, action, data); return(true); }
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); }