Fade.FadeIn C# (CSharp) Method

FadeIn() public method

public FadeIn ( float time ) : Coroutine
time float
return Coroutine
    public Coroutine FadeIn(float time)
    {
        return FadeIn (time, null);
    }

Same methods

Fade::FadeIn ( float time, System action ) : Coroutine

Usage Example

示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (DisplayedResult = true)
     {
         if (Input.GetKeyDown(KeyCode.H))
         {
             if (ScoreCanvas.activeSelf)
             {
                 ScoreCanvas.SetActive(false);
             }
             else
             {
                 ScoreCanvas.SetActive(true);
             }
         }
         if (Input.GetKeyDown(KeyCode.R))
         {
             audioSource.PlayOneShot(transition);
             fade.FadeIn(0.5f, () =>
             {
                 SceneManager.LoadScene("Main");
             });
         }
         if (Input.GetKeyDown(KeyCode.E))
         {
             audioSource.PlayOneShot(transition);
             fade.FadeIn(0.5f, () =>
             {
                 SceneManager.LoadScene("Title");
             });
         }
     }
 }
All Usage Examples Of Fade::FadeIn