IEnumerator ExitFade(Image img, float to, float time) { float from = img.color.a; float timer = 0; while (timer < time) { from = Mathf.Lerp(from, to, timer); img.color = new Color(img.color.r, img.color.g, img.color.b, from); timer += Time.deltaTime; yield return(null); } SceneManager.LoadScene(sceneConfig.GetNextScene(gameManager.playerConfig.gameMode, SceneManager.GetActiveScene().buildIndex)); }
public void LoadScene() { SceneManager.LoadScene(sceneConfig.GetNextScene(playerConfig.gameMode, SceneManager.GetActiveScene().buildIndex)); }