private void SetupTransition(string name, Condition.ICondition condition, Action[] actions) { Name = name; TransitionCondition = condition; if (actions.Length > 0) { Actions.AddRange(actions); } }
public Transition(string name, Condition.ICondition condition, State targetState, List <Action> actions) { SetupTransition(name, condition, actions.ToArray()); SetTargetState(targetState); }
/// <summary> /// Constructor for Transition (Don't forget to add the Target state after states have been made) /// </summary> /// <param name="name">The name of the transition</param> /// <param name="condition">The condition for the transition to fire.</param> /// <param name="actions">Any actions that should be performed whist transitioning.</param> public Transition(string name, Condition.ICondition condition, params Action[] actions) { SetupTransition(name, condition, actions); }
public Transition(string name, Condition.ICondition condition, State targetState, params Action[] actions) { SetupTransition(name, condition, actions); SetTargetState(targetState); }
/// <summary> /// Constructor for Transition (Don't forget to add the Target state after states have been made) /// </summary> /// <param name="name">The name of the transition</param> /// <param name="condition">The condition for the transition to fire.</param> /// <param name="actions">Any actions that should be performed whist transitioning.</param> public Transition(string name, Condition.ICondition condition, List <Action> actions) { SetupTransition(name, condition, actions.ToArray()); }