| 1 | using System.Collections; |
| 2 | using System.Collections.Generic; |
| 3 | using UnityEngine; |
| 4 | using UnityEngine.SceneManagement; |
| 5 | |
| 6 | public class BackToGame : MonoBehaviour |
| 7 | { |
| 8 | private float timer = 5; |
| 9 | private bool done = false; |
| 10 | |
| 11 | void Update() |
| 12 | { |
| 13 | if(!done) |
| 14 | { |
| 15 | timer -= Time.deltaTime; |
| 16 | |
| 17 | if (timer <= 0) |
| 18 | SceneManager.LoadScene(0); |
| 19 | } |
| 20 | } |
| 21 | } |