public static FlowStateTransition WithDefaultTrigger(IState source, IState destination) { var flowStateTransition = new FlowStateTransition(source, destination); flowStateTransition.nest.source = GraphSource.Embed; flowStateTransition.nest.embed = GraphWithDefaultTrigger(); return(flowStateTransition); }
public void EndTransition(IState destination) { UndoUtility.RecordEditedObject("Create State Transition"); var transition = FlowStateTransition.WithDefaultTrigger(transitionSource, destination); graph.transitions.Add(transition); transitionSource = null; this.Widget(transition).BringToFront(); selection.Select(transition); GUI.changed = true; }