示例#1
0
 private void SetupTransition(string name, Condition.ICondition condition, Action[] actions)
 {
     Name = name;
     TransitionCondition = condition;
     if (actions.Length > 0)
     {
         Actions.AddRange(actions);
     }
 }
示例#2
0
 public Transition(string name, Condition.ICondition condition, State targetState, List <Action> actions)
 {
     SetupTransition(name, condition, actions.ToArray());
     SetTargetState(targetState);
 }
示例#3
0
 /// <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);
 }
示例#4
0
 public Transition(string name, Condition.ICondition condition, State targetState, params Action[] actions)
 {
     SetupTransition(name, condition, actions);
     SetTargetState(targetState);
 }
示例#5
0
 /// <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());
 }