예제 #1
0
 void Update()
 {
     if ((timeLeft <= 5) && (timeLeft > 0))
     {
         countdownText.text = ("" + timeLeft);
     }
     else if (timeLeft == 0)
     {
         countdownText.text = " ";
         StopCoroutine("LoseTime");
         startBool = true;
         if (startBool == true)
         {
             Debug.Log("start capture");
             StartCapture();
             startBool = false;
             timeLeft  = 6;
         }
     }
     else
     {
         countdownText.text = "  ";
     }
     if (gifTime == 0)
     {
         StopCoroutine("Time");
         gifTime = 5;
         capture.StopCapture();
         ShareResult();
         SceneManager.LoadScene("ShareScene_gif");
     }
 }
예제 #2
0
    public void BirdDied()
    {
        //Activate the game over text.
        gameOvertext.SetActive(true);
        //Set the game to be over.
        gameOver = true;

        // stop recording
        _capture.StopCapture();
        capturePreview.Play();
    }
예제 #3
0
 public void RecordVideo(bool isPlaying)
 {
     if (isPlaying)
     {
         _capture.StartCapture();
     }
     else
     {
         _capture.StopCapture();
         ShareResult();
     }
 }
    public void StopRacording()
    {
        if (isRecording)
        {
            recordIndication.stopBlinking();
            // stop recording
            _capture.StopCapture();
            Debug.LogWarning("Stop recording, recorded: " + Time.realtimeSinceStartup + " Took " + (Time.realtimeSinceStartup - startRecordingTime));
            isRecording = false;

            ShowPreview();
        }
    }
    // stop recording
    private void ActionFinished()
    {
        capture.StopCapture();
        capture.GenerateCapture(result =>
        {
            // use gif, like send it to your friends by using GetSocial Sdk
            Debug.Log("Should save gif");
            //upload to somwhere
        });

        // show preview
        gifPreview.SetActive(true);
        uploadBtn.SetActive(true);
        capturePreview.Play();

        startCapture = false;
    }