Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        var fader = ScreenFader.Instance;

        fader.FadeTo(Color.black, 10f);
        ExperienceApp.End();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Is running");
        var fader = ScreenFader.Instance;

        fader.FadeTo(Color.black, 10f);
        ExperienceApp.End();
        Debug.Log("Is running");
    }
    private IEnumerator Outro()
    {
        ScreenFader.Instance.FadeToBlack(13);
        yield return(ScreenFader.Instance.WaitUntilFadeComplete());

        yield return(new WaitForSeconds(2));

        ExperienceApp.End();
    }
Example #4
0
    private IEnumerator EndOfGame()
    {
        ScreenFader.Instance.FadeTo(Color.black, duration: 1);
        yield return(ScreenFader.Instance.WaitUntilFadeComplete());

        Debug.Log("End");
        ExperienceApp.End();
        Application.Quit();
    }
Example #5
0
 // Update is called once per frame
 void FixedUpdate()
 {
     if (TimeTracker < (TotalDuration + fadeDuration))
     {
         TimeTracker += Time.deltaTime;
         if (TimeTracker > TotalDuration)
         {
             callFader = true;
             Fader();
         }
     }
     else
     {
         ExperienceApp.End();
     }
     //slider.value = TimeTracker / TotalDuration;
 }
Example #6
0
    /// <summary>
    /// End will only close the application when you're within the platform
    /// </summary>
    public void End()
    {
        StartCoroutine(routine());

        IEnumerator routine()
        {
            var elapsedTime    = 0f;
            var startingVolume = AudioListener.volume;

            ScreenFader.Instance.FadeToBlack(FadeOutTime);

            while (elapsedTime < FadeOutTime)
            {
                elapsedTime         += Time.deltaTime;
                AudioListener.volume = Mathf.Lerp(startingVolume, 0f, elapsedTime / FadeOutTime);
                yield return(new WaitForEndOfFrame());
            }

            ExperienceApp.End();
        }
    }
Example #7
0
 public void EndTheApp()
 {
     ExperienceApp.End();
 }
Example #8
0
 public void QuitGame()
 {
     ExperienceApp.End();
 }
Example #9
0
 protected override void EnactSpringActions()
 {
     ExperienceApp.End();
 }