From 21e6914de2beb3e5bc71648df2831cebabbf8fe8 Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Tue, 4 Feb 2020 22:33:20 -0500 Subject: [PATCH] Fixed bugs revolving around the pause menu, retry button and waypoint spawn counting --- Assets/Scripts/PauseMenu.cs | 3 +++ Assets/Scripts/WaypointRace.cs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Assets/Scripts/PauseMenu.cs b/Assets/Scripts/PauseMenu.cs index f7914e2..3df7028 100644 --- a/Assets/Scripts/PauseMenu.cs +++ b/Assets/Scripts/PauseMenu.cs @@ -250,16 +250,19 @@ public class PauseMenu : MonoBehaviour if(FloorLevel.gameOver == true) { + FloorLevel.gameOver = false; SceneManager.LoadScene("Floor Level", LoadSceneMode.Single); } if(WaypointRace.gameOver == true) { + WaypointRace.gameOver = false; SceneManager.LoadScene("Waypoint Race", LoadSceneMode.Single); } if(InfinityRunner.gameOver == true) { + InfinityRunner.gameOver = false; SceneManager.LoadScene("Infinity Runner", LoadSceneMode.Single); } diff --git a/Assets/Scripts/WaypointRace.cs b/Assets/Scripts/WaypointRace.cs index af496e6..b55781f 100644 --- a/Assets/Scripts/WaypointRace.cs +++ b/Assets/Scripts/WaypointRace.cs @@ -59,10 +59,12 @@ public class WaypointRace : MonoBehaviour waypointPlacement(); script.lives = 3; level++; + completionTime += 15*(size-1); if(level > 3) { size++; level = 1; + script.lives = 4; script.respawn = true; script.respawnTime = Time.time + 0.25f; countdown = Time.time; @@ -184,6 +186,8 @@ public class WaypointRace : MonoBehaviour void waypointPlacement() { + script.lives = 3; + groundedScript.transform.position = new Vector3( Random.Range(-100*size, 100*size), Random.Range(2, 10), Random.Range(-100*size, 100*size));