Пример #1
0
            private static IEnumerator DoStateThenGoTo(StateMachine stateMachine, TimelineStateRef TimelineState, CoroutineRef goToState)
            {
                yield return(stateMachine.StartCoroutine(TimelineStateMachine.Run(stateMachine, TimelineState)));

                stateMachine.StartCoroutine(goToState.RunCoroutine());

                yield break;
            }
Пример #2
0
            public eEventTriggerReturn Trigger(StateMachine stateMachine)
            {
                switch (_stateType)
                {
                case eStateType.Coroutine:
                {
                    stateMachine.GoToState(_coroutine.RunCoroutine());
                }
                break;

                case eStateType.Timeline:
                {
                    stateMachine.GoToState(TimelineStateMachine.Run(stateMachine, _state));
                }
                break;
                }

                return(eEventTriggerReturn.EventFinishedExitState);
            }
Пример #3
0
            public override IEnumerator PerformState(StateMachineComponent stateMachine)
            {
                yield return(_coroutine.RunCoroutine());

                stateMachine.GoToState(StateMachine.Run(stateMachine, _goToState));
            }
Пример #4
0
 public eEventTriggerReturn Trigger(StateMachineComponent stateMachine)
 {
     stateMachine.StartCoroutine(_coroutine.RunCoroutine());
     return(eEventTriggerReturn.EventFinished);
 }