Esempio n. 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();
             }
         }
     }
 }
Esempio n. 2
0
    private void onStateStarted(Signal signal)
    {
        StateStartedSignal stateStartedSignal = (StateStartedSignal)signal;

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