private void onMoveButtonPressed(Signal signal) { if (CutSceneManager.Inst.ActiveSlideIsEndGame) { SceneManager.LoadScene("MainScene"); } if (CutSceneManager.Inst.InputDelayExpired) { MoveButtonPressedSignal moveButtonPressedSignal = (MoveButtonPressedSignal)signal; if (moveButtonPressedSignal.moveButton == MoveButton.ATTACK || moveButtonPressedSignal.moveButton == MoveButton.SWITCH) { if (CutSceneManager.Inst.ActiveSlideIsLastInSequence) { nextState = new FinalFadeOutState(); } else if (CutSceneManager.Inst.GetNextFadeType() == FadeType.CROSS) { nextState = new CrossFadeState(); } else { nextState = new FadeThroughBlackState(); } } } }
private void onStateStarted(Signal signal) { StateStartedSignal stateStartedSignal = (StateStartedSignal)signal; if (stateStartedSignal.startedState.GetType() == typeof(IntroState)) { CutSceneManager.Inst.SetActiveSequence(0); nextState = new FadeInState(); } }
public void FadeIn(TriggerEvents e) { state = CutSceneState.STARTS_FADING_IN; gameObject.GetComponent <Animator> ().enabled = true; gameObject.GetComponent <Animator>().SetBool("StartFadingIn", true); if (e != null) { events += e; } }
private void onPlayerExitingJelloporter(Signal signal) { PlayerExitingJelloporterSignal playerExitingJelloporterSignal = (PlayerExitingJelloporterSignal)signal; JelloPlate plate = playerExitingJelloporterSignal.jelloporter.GetCurrentPlate(); CutSceneSequence sequence = CutSceneManager.Inst.GetUnplayedSequenceFor(plate); if (sequence != null) { CutSceneManager.Inst.SetActiveSequence(sequence); nextState = new FirstFadeInState(); } }
private void Update() { if (inputDelay > 0f) { inputDelay -= Time.deltaTime; } if (currentState == null) { currentState = new BlackState(); currentState.Start(); } CutSceneState nextState = currentState.Update(); if (nextState != currentState) { currentState.End(); currentState = nextState; currentState.Start(); } }
public WaitForTriggerState() { nextState = this; }
public WaitForUserState() { nextState = this; }
public BlackState() { nextState = this; }