void Update()
 {
     if (Input.GetAxisRaw("Submit") > 0)
     {
         sc.FadeToLevel(gs.currentScene);
     }
 }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetAxisRaw("Submit") > 0)
     {
         sc.FadeToLevel("Entryway");
     }
 }
Example #3
0
 public void TriggerAnimator(string targetLevel)
 {
     if (sr.color.a == 0)
     {
         PlayConfirm();
         sceneChanger.FadeToLevel(targetLevel);
     }
 }
 void Update()
 {
     if (Input.GetAxisRaw("Submit") > 0)
     {
         gs.currentScene = "Entryway";
         sc.FadeToLevel("Entryway");
     }
 }
    public void EndDialogue()
    {
        //enables menu
        endText = true;
        Player.GetComponent <PlayerMovementFinal>().enabled = true;
        Player.GetComponent <Rigidbody2D>().velocity        = new Vector2(0, 0);

        //disables menu
        if (pauseMenu != null)
        {
            pauseMenu.enabled = true;
        }
        if (Background != null)
        {
            Background.SetBool("isOpen", false);
        }

        nameBorderText.SetBool("isOpen", false);
        CharacterFrame.SetBool("isOpen", false);
        textBox.SetBool("isOpen", false);
        CharacterFrameObject.SetActive(false);

        //Triggers tutorial if tutorialTrigger = true
        if (tutorialTrigger == true && tutorial != null)
        {
            FindObjectOfType <TutorialManager>().StartTutorial(tutorial);
        }

        //Triggers boss if bossTrigger = true
        if (bossTrigger == true)
        {
            loadBattle.StartCoroutine("BattleSetup");

            if (GameObject.FindGameObjectsWithTag("Boss1").Length >= 1)
            {
                EnemyHolder.bossNumber = 1;
            }
            else if (GameObject.FindGameObjectsWithTag("Boss2").Length >= 1)
            {
                EnemyHolder.bossNumber = 2;
            }
            else if (GameObject.FindGameObjectsWithTag("Boss3").Length >= 1)
            {
                EnemyHolder.bossNumber = 3;
            }
        }

        if (sceneTransition == true)
        {
            sceneChanger.FadeToLevel(sceneNumber);
        }
    }
    private void Update()
    {
        if ((gs.visionLevel + 1) <= visionPoints.visionPoints / 100)
        {
            Debug.Log("Load Vision");
            gs.visionLevel += 1;
            sc.FadeToLevel("VisionScene");
        }

        if (Input.GetAxisRaw("Cancel") != 0)
        {
            Debug.Log("Quit!");
            Application.Quit();
        }

        if (Input.GetAxisRaw("Submit") > 0)
        {
            if (submit_pressed == false)
            {
                s_textBoxManager.DisableTextBox();
                submit_pressed = true;
            }
        }

        if (Input.GetAxisRaw("Submit") == 0)
        {
            submit_pressed = false;
        }

        if (!music.isPlaying)
        {
            timecheck += Time.deltaTime;
            if (timecheck > 0.5f)
            {
                mixer.SetFloat("MusicVolume", -10.0f);
                timecheck = 0.0f;
            }
        }
    }
 public void LoadOpening()
 {
     sc.FadeToLevel("Opening");
 }