private IEnumerator LoadLevel(string level, float fadeDuration) { sceneFade.StartFade(SceneFade.Direction.Out, fadeDuration); yield return(new WaitForSeconds(fadeDuration)); SceneManager.LoadScene(level); }
void Start() { fuelCollected = 0; audioSource = GetComponent <AudioSource>(); sceneFade = GetComponent <SceneFade>(); sceneFade.StartFade(SceneFade.Direction.In, 0.5f); }