Exemple #1
0
    /**
     * On the display screen go to the share screen when user presses the OK button
     * Go to back to take a photo if user presses the RETRY button
     * Go to welcome screen if user presses the ABORT button
     **/
    private void ManageDisplayScreen()
    {
        if (IsButtonDown(InterfaceButtons.ABORT))
        {
            mTimeout.Reset();
            StopCoroutine(mTimeoutCoroutine);

            // For logs
            Logger.Instance.WriteVisualizeAbandon();

            mSkyboxMng.ResetSkybox();
            mCurrentState = ScreensStates.WELCOME;
            mCamera.AutomaticRotation(mTimeout);
        }
        else if (IsButtonDown(InterfaceButtons.RETRY))
        {
            mTimeout.Reset();

            // For logs
            Logger.Instance.WriteVisualizeRestart();
            mOSCController.StartLivePreview();
            mCurrentState = ScreensStates.READY_TAKE_PHOTO;
        }
        else if (IsButtonDown(InterfaceButtons.SHARE))
        {
            mTimeout.Reset();

            // For logs
            Logger.Instance.WriteVisualizeShare();
            mCurrentState = ScreensStates.SHARE_PHOTO;
            Debug.Log("Sending photo to server");
            mSharingServer.SendToServer(mFullResolutionImage);
        }
        else
        {
            return;
        }
        UpdateScreen();
    }