public Coroutine FadeIn(float time)
{
return FadeIn (time, null);
}
Fade::FadeIn ( float time, System action ) : Coroutine |
// 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"); }); } } }