예제 #1
0
    internal void CreateTransition(TransitionOutPoint from, EditorStateNode to)
    {
        var trans = new EditorTransition(from, to, this);

        Transitions.Add(trans);
        changed = true;
    }
예제 #2
0
        /// <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;
            }
        }
예제 #3
0
 public void Draw(Vector2 mousePos)
 {
     if (from != null)
     {
         EditorTransition.DrawTransitionLine(from.Position, mousePos, editor.TransitionArrowSize, editor.TransitionColor);
     }
 }
예제 #4
0
        /// <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;
            }
        }
예제 #5
0
 public void OnTransitionRemoved(EditorTransition trans)
 {
     outPoints.ForEach(p =>
     {
         if (trans == p.Transition)
         {
             p.Transition = null;
         }
     });
 }
예제 #6
0
    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);
            }
        }
    }
예제 #7
0
        /// <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;
            }
        }
        /// <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;
            }
        }
예제 #9
0
 public void RemoveTransition(EditorTransition editorTransition)
 {
     Transitions.Remove(editorTransition);
 }
예제 #10
0
 internal void InformOfTransitionEdit(EditorTransition editorTransition)
 {
     stateInfoEditor.CurrentObjectDisplayed = editorTransition;
 }
예제 #11
0
 public int GetTransitionIdx(EditorTransition editorTransition)
 {
     return(Transitions.IndexOf(editorTransition));
 }