diff options
author | Carson Katri <carson.katri@gmail.com> | 2021-06-13 01:51:37 -0400 |
---|---|---|
committer | Carson Katri <carson.katri@gmail.com> | 2021-06-13 01:51:37 -0400 |
commit | 994202b1439fced5859d0cc7e916721f8892cb25 (patch) | |
tree | 18e1d4ea14ae6d7136c23025c7cbca9b95099521 /Assets/Scripts | |
parent | c55b824fc4bc2fd1053497da7c9594792bca10ed (diff) | |
download | gmtk-gamejam-994202b1439fced5859d0cc7e916721f8892cb25.tar.gz gmtk-gamejam-994202b1439fced5859d0cc7e916721f8892cb25.tar.zst gmtk-gamejam-994202b1439fced5859d0cc7e916721f8892cb25.zip |
Fix again
Diffstat (limited to 'Assets/Scripts')
-rw-r--r-- | Assets/Scripts/Controllers/GameController.cs | 3 | ||||
-rw-r--r-- | Assets/Scripts/Controllers/MenuController.cs | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Assets/Scripts/Controllers/GameController.cs b/Assets/Scripts/Controllers/GameController.cs index f2e3283..6faf2dd 100644 --- a/Assets/Scripts/Controllers/GameController.cs +++ b/Assets/Scripts/Controllers/GameController.cs @@ -63,6 +63,7 @@ namespace Controllers private void Start() { + startTime = Time.time - 2f; freezeMotion = true; StartCoroutine(FadeInCoat()); } @@ -85,6 +86,7 @@ namespace Controllers freezeMotion = false; startTime = Time.time; + ball.Rigidbody.AddForce(new Vector2(0f, 10f)); } private void Update() @@ -273,6 +275,7 @@ namespace Controllers } public void Restart() => SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); + public void MainMenu() => SceneManager.LoadScene("Menu"); internal enum State diff --git a/Assets/Scripts/Controllers/MenuController.cs b/Assets/Scripts/Controllers/MenuController.cs index ce1da25..9c96c6b 100644 --- a/Assets/Scripts/Controllers/MenuController.cs +++ b/Assets/Scripts/Controllers/MenuController.cs @@ -10,5 +10,10 @@ namespace Controllers GameController.timeLimit = minutes * 60f; SceneManager.LoadScene("Main"); } + + public void Quit() + { + Application.Quit(); + } } } |