1
Fork 0
mirror of https://github.com/Steffo99/keep-everything-alive.git synced 2024-11-22 01:14:19 +00:00

Revert StartOnAnyKey edit

This commit is contained in:
Steffo 2020-04-20 22:53:59 +02:00
parent ff4b5adb3c
commit 77793bdd9a

View file

@ -5,21 +5,9 @@ using UnityEngine.SceneManagement;
public class StartOnAnyKey : MonoBehaviour public class StartOnAnyKey : MonoBehaviour
{ {
public float activateAfter = 1.5f;
private bool active;
void Start() {
active = false;
Invoke("Activate", activateAfter);
}
void Activate() {
active = true;
}
void Update() void Update()
{ {
if(Input.anyKeyDown && active) { if(Input.anyKeyDown) {
SceneManager.LoadScene("Default"); SceneManager.LoadScene("Default");
} }
} }