Ejemplo n.º 1
0
    internal void CreateTransition(TransitionOutPoint from, EditorStateNode to)
    {
        var trans = new EditorTransition(from, to, this);

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