示例#1
0
    private void Update()
    {
        // Check if the correct input was registered, if the narrative is not null, and if the tutorial panel is not open
        // (to prevent the narrative from continuing at the same time as the tutorial panel is closed).
        if ((Input.GetButtonDown(pCon.controls.interact) || Controls.IsRight || Input.GetButtonDown(pCon.controls.jump)) && N != null && !tutorialController.isOpen && Time.timeScale == 1)
        {
            if (isTyping)
            {
                if (typeCoroutine != null)
                {
                    typingSource.Stop();
                    AM.PlayConsistentOneShot(quickTypeSound, quickTypeVolume);
                    StopCoroutine(typeCoroutine);
                }

                isTyping = false;
                activeSpeakerUI.Dialogue = line.text;
            }
            else
            {
                AM.PlayConsistentOneShot(continueSound, continueVolume);
                AdvanceNarrative();
            }
        }

        if (Input.GetButtonDown(pCon.controls.ability_1) && N != null && Time.timeScale == 1)
        {
            if (tutorialController.isOpen)
            {
                tutorialController.HideTutorial();
            }

            EndResetNarrativeController();
        }
    }
示例#2
0
 private void CloseTutorial()
 {
     CrossPlatformInputManager.SwitchActiveInputMethod(SettingsManager.touchControlsEnabled ? CrossPlatformInputManager.ActiveInputMethod.Touch : CrossPlatformInputManager.ActiveInputMethod.Hardware);
     if (proceedToGame)
     {
         //MenuPhase = MenuPhase.Main;
         GameController.current.LoadGame(true);
         //PlayButtonClicked();
     }
     else
     {
         _tutorialController.HideTutorial();
         _anim.SetTrigger("CloseTutorial");
         MenuPhase = MenuState.Settings;
     }
 }