Exemple #1
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());
    }
Exemple #2
0
    //If quitting the game at that stge, go back to login screen
    public void QuitApp()
    {
        quitButton.interactable = false;
        quitPressed             = true;
#if UNITY_ANDROID && !UNITY_EDITOR
        Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action());
#endif
        logInfo.Reset();
        extRes.Reset();

        StartCoroutine(QuitAppCo());
    }
    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;
        //If quitting the application, reset the game info and log info, then reset to profile screen
#if UNITY_ANDROID && !UNITY_EDITOR
        Opie.instance().head().set_linked_pose_and_eye_position(0.5f, 0.5f, Opie.Head.transition_action());
#endif
        gameData.Reset();
        logInfo.Reset();
        extRes.Reset();

        quitButton.interactable = false;

        StartCoroutine(QuitAppCo());
    }