Ejemplo n.º 1
0
            public static IEnumerator Run(StateMachineComponent stateMachine, State startState, GameObject sourceObject = null)
            {
                if (startState != null)
                {
#if UNITY_EDITOR && DEBUG
                    StateMachineDebug.OnStateStarted(stateMachine, startState, null);
#endif
                    return(startState.PerformState(stateMachine));
                }

                return(null);
            }
Ejemplo n.º 2
0
            public static IEnumerator Run(StateMachineComponent stateMachine, StateRefProperty startState, GameObject sourceObject = null)
            {
                State state = startState.LoadTimelineState(sourceObject != null ? sourceObject : stateMachine.gameObject);

                if (state != null)
                {
#if UNITY_EDITOR && DEBUG
                    string debugFileName = AssetDatabase.GetAssetPath(startState.GetFile());
                    StateMachineDebug.OnStateStarted(stateMachine, state, debugFileName);
#endif
                    return(state.PerformState(stateMachine));
                }

                return(null);
            }
Ejemplo n.º 3
0
            public static IEnumerator Run(StateMachineComponent stateMachine, StateRef startState, GameObject sourceObject = null)
            {
                State state = startState.GetState(sourceObject != null ? sourceObject : stateMachine.gameObject);

                if (state != null)
                {
#if UNITY_EDITOR && DEBUG
                    string debugFileName = startState.GetExternalFile().GetFilePath();
                    StateMachineDebug.OnStateStarted(stateMachine, state, debugFileName);
#endif
                    return(state.PerformState(stateMachine));
                }

                return(null);
            }