internal void CreateTransition(TransitionOutPoint from, EditorStateNode to) { var trans = new EditorTransition(from, to, this); Transitions.Add(trans); changed = true; }
/// <summary> /// This function is called when the editor is undergoing a play mode related transition. /// </summary> private static void OnTransition(EditorTransition transition) { switch (transition) { case EditorTransition.PreIntoPlay: // Unity's ISerializationCallbackReceiver will handle serializing the objects // that are dirty for us break; case EditorTransition.PostIntoPlay: // we don't have to restore here, as BaseBehavior will automatically restore // itself break; case EditorTransition.PostOutPlay: // we don't have to restore here, as BaseBehaviorEditor will automatically // restore the necessary BaseBehaviors break; // don't do anything for pausing in this release case EditorTransition.IntoPause: case EditorTransition.OutPause: break; } }
public void Draw(Vector2 mousePos) { if (from != null) { EditorTransition.DrawTransitionLine(from.Position, mousePos, editor.TransitionArrowSize, editor.TransitionColor); } }
/// <summary> /// This function is called when the editor is undergoing a play mode /// related transition. /// </summary> private static void OnTransition(EditorTransition transition) { fiLog.Log(typeof(PlayModeDetector), "Got transition " + transition); switch (transition) { case EditorTransition.PreIntoPlay: fiSerializationManager.SerializeObject(typeof(PlayModeDetector), Selection.activeObject); break; case EditorTransition.PostIntoPlay: // we don't have to restore here, as BaseBehavior will // automatically restore itself break; case EditorTransition.PostOutPlay: // we don't have to restore here, as BaseBehaviorEditor will // automatically restore the necessary BaseBehaviors break; // don't do anything for pausing in this release case EditorTransition.IntoPause: case EditorTransition.OutPause: break; } }
public void OnTransitionRemoved(EditorTransition trans) { outPoints.ForEach(p => { if (trans == p.Transition) { p.Transition = null; } }); }
private void CreateNewTransitions() { for (int i = 0; i < StateMachine.StateCount; i++) { var state = StateMachine.States[i]; for (int j = 0; j < state.TransitionCount; j++) { var trans = state.Transitions[j]; EditorTransition editTrans = new EditorTransition(trans, this); Transitions.Add(editTrans); } } }
public void RemoveTransition(EditorTransition editorTransition) { Transitions.Remove(editorTransition); }
internal void InformOfTransitionEdit(EditorTransition editorTransition) { stateInfoEditor.CurrentObjectDisplayed = editorTransition; }
public int GetTransitionIdx(EditorTransition editorTransition) { return(Transitions.IndexOf(editorTransition)); }