Example #1
0
 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();
             }
         }
     }
 }
Example #2
0
    private void onStateStarted(Signal signal)
    {
        StateStartedSignal stateStartedSignal = (StateStartedSignal)signal;

        if (stateStartedSignal.startedState.GetType() == typeof(IntroState))
        {
            CutSceneManager.Inst.SetActiveSequence(0);
            nextState = new FadeInState();
        }
    }
Example #3
0
    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;
        }
    }
Example #4
0
    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();
        }
    }
Example #5
0
    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();
        }
    }
Example #6
0
 public WaitForTriggerState()
 {
     nextState = this;
 }
Example #7
0
 public WaitForUserState()
 {
     nextState = this;
 }
Example #8
0
 public BlackState()
 {
     nextState = this;
 }