コード例 #1
0
    private IEnumerator LoadLevel(string level, float fadeDuration)
    {
        sceneFade.StartFade(SceneFade.Direction.Out, fadeDuration);
        yield return(new WaitForSeconds(fadeDuration));

        SceneManager.LoadScene(level);
    }
コード例 #2
0
 void Start()
 {
     fuelCollected = 0;
     audioSource   = GetComponent <AudioSource>();
     sceneFade     = GetComponent <SceneFade>();
     sceneFade.StartFade(SceneFade.Direction.In, 0.5f);
 }