Exemple #1
0
    /// <summary> IEnumerator <c>FadeToBlack</c> Fade out the screen </summary>
    IEnumerator FadeToBlack()
    {
        CanvasGroup cp = primaryCanvas.GetComponent <CanvasGroup>(); //get local UI window

        while (cp.alpha > 0)                                         //while there's still screen to fade out..
        {
            cp.alpha -= Time.deltaTime / 2;                          //log removal

            //stop cursor interaction
            Cursor.visible   = false;
            Cursor.lockState = CursorLockMode.Locked;

            yield return(null);
        }

        //display post day screen
        postDayCanvas.SetActive(true);

        cp.interactable = false;

        //allow cursor movement
        Cursor.visible   = true;
        Cursor.lockState = CursorLockMode.None;

        OS.ChangeCursorBackToOrignalCursor();

        for (float t = 0.01f; t < 2f; t += 0.1f) //dither effect
        {
            shaderEffect.color0 = Color.Lerp(ditherEffect.gray, ditherEffect.black, t / 2f);
            yield return(null);
        }

        primaryCanvas.SetActive(false);

        yield return(null);
    }
 void Start() => config.ChangeCursorBackToOrignalCursor();
Exemple #3
0
 void Start()
 {
     gm.ChangeCursorBackToOrignalCursor();
     UpdateFields();
 }