PracProg/Assets/Scripts/Animations/BlackFade.cs

20 lines
451 B
C#
Raw Normal View History

2021-02-04 19:49:39 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class BlackFade : MonoBehaviour
{
void OnBlackFadeFinished()
{
if(SceneManager.GetActiveScene().name == "Menu")
{
SceneManager.LoadScene("Game");
}
else if(SceneManager.GetActiveScene().name == "Game")
{
SceneManager.LoadScene("Menu");
}
}
}