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); }
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); }
internal void AddEmitCondition(SignalCondition <TState, TTransition, TSignal> condition) { this.EmitConditionsI.Add(condition); }