mirror of
https://github.com/Steffo99/keep-everything-alive.git
synced 2024-11-21 17:04:20 +00:00
Revert StartOnAnyKey edit
This commit is contained in:
parent
ff4b5adb3c
commit
77793bdd9a
1 changed files with 1 additions and 13 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue