コード例 #1
0
 // if the restart button is pressed
 public void RestartFromLevel1()
 {
     if (!quitPressed)
     {
         quitPressed             = true;
         quitButton.interactable = false;
         gameData.Reset();
         UnityEngine.SceneManagement.SceneManager.LoadScene("ProgressMenu");
     }
 }
コード例 #2
0
    public void QuitApp()
    {
        // the only way for quitPressed to be true here is when the game has started progressing to
        // next stage, so should not quit. this is an extra safeguard in case the disabling the button
        // doesnt happen fast enough. Unity doesnt always update the UI immediately
        if (quitPressed)
        {
            return;
        }

        quitPressed             = true;
        quitButton.interactable = false;
#if UNITY_ANDROID && !UNITY_EDITOR
        Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action());
#endif
        Microphone.End(Microphone.devices[0]);
        if (RecordingText.text == "recording...")
        {
            RecordingText.text = "Stop recording";
        }
        gameData.Reset();
        logInfo.Reset();
        extRes.Reset();


        StartCoroutine(QuitAppCo());
    }
コード例 #3
0
    //If quitting the game at that stge, go back to login screen
    public void quit_app()
    {
        // the only way for quitPressed to be true here is when the game has started progressing to
        // next stage, so should not quit. this is an extra safeguard in case the disabling the button
        // doesnt happen fast enough. Unity doesnt always update the UI immediately
        if (quitPressed)
        {
            return;
        }

        quitPressed = true;
#if UNITY_ANDROID
        Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action());
#endif
        gameData.Reset();
        quitButton.interactable = false;

        UnityEngine.SceneManagement.SceneManager.LoadScene("language_selection");
        //StartCoroutine(QuitAppCo());
    }