示例#1
0
        internal void AddTransitionCondition(SignalCondition <TState, TTransition, TSignal> condition, Transition <TState, TTransition, TSignal> transition)
        {
            if (condition == null || transition == null || !this.SignalToI.Exists(t => t.Name.Equals(transition.Name)))
            {
                return;
            }

            this.TransitionConditionsI.Add(condition, transition);
        }
示例#2
0
        public bool CreateEmitCondition(Signal <TState, TTransition, TSignal> signal, params State <TState, TTransition, TSignal>[] conditionalStates)
        {
            if (signal == null || !this.SignalMapI.ContainsKey(signal.Name))
            {
                return(false);
            }

            foreach (var conditionalState in conditionalStates)
            {
                if (conditionalState == null || !this.StateMapI.ContainsKey(conditionalState.Name))
                {
                    return(false);
                }
            }

            var signalCondition = new SignalCondition <TState, TTransition, TSignal>();

            signalCondition.AddCondition(conditionalStates);
            signal.AddEmitCondition(signalCondition);
            return(true);
        }
示例#3
0
 internal void AddEmitCondition(SignalCondition <TState, TTransition, TSignal> condition)
 {
     this.EmitConditionsI.Add(condition);
 }