Set up transition to next scene in intro

This commit is contained in:
Sweet Tini
2020-01-30 21:25:07 -05:00
parent afc6c879e7
commit afd03f2e3a
4 changed files with 223 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LogoIntroCutscene : Cutscene
{
@@ -20,14 +21,17 @@ public class LogoIntroCutscene : Cutscene
yield return RotateCube();
yield return new WaitForSeconds(.2f);
yield return FadeInLogo();
yield return new WaitForSeconds(1f);
yield return new WaitForSeconds(1.1f);
yield return FadeOutLogo();
yield return new WaitForSeconds(.2f);
}
protected override void OnSceneEnd()
{
// TODO: Go to the next scene.
var nextIndex = SceneManager.GetActiveScene().buildIndex + 1;
if (SceneManager.sceneCountInBuildSettings > nextIndex)
SceneManager.LoadScene(nextIndex);
}
IEnumerator RotateCube()