private static IEnumerator DoStateThenGoTo(StateMachine stateMachine, TimelineStateRef TimelineState, CoroutineRef goToState) { yield return(stateMachine.StartCoroutine(TimelineStateMachine.Run(stateMachine, TimelineState))); stateMachine.StartCoroutine(goToState.RunCoroutine()); yield break; }
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); }
public override IEnumerator PerformState(StateMachineComponent stateMachine) { yield return(_coroutine.RunCoroutine()); stateMachine.GoToState(StateMachine.Run(stateMachine, _goToState)); }
public eEventTriggerReturn Trigger(StateMachineComponent stateMachine) { stateMachine.StartCoroutine(_coroutine.RunCoroutine()); return(eEventTriggerReturn.EventFinished); }