Added final game mode - infinity runner

This commit is contained in:
Gregory Campbell
2020-01-29 22:59:06 -05:00
parent a18a380505
commit 4da18fe82b
10 changed files with 2788 additions and 4 deletions
+17
View File
@@ -41,6 +41,12 @@ public class PauseMenu : MonoBehaviour
}
if(SceneManager.GetActiveScene().name == "Infinity Runner")
{
ScoreText.text = "LEVEL: " + InfinityRunner.escalation + "-" + InfinityRunner.level;
LivesText.text = "LIVES: " + PlayerController.shownLives;
}
if(Input.GetButtonDown("Pause"))
{
if(GameIsPaused)
@@ -113,6 +119,12 @@ public class PauseMenu : MonoBehaviour
TimeText.text = "TIME: " + Mathf.Round(WaypointRace.fullTime);
}
if(InfinityRunner.gameOver == true)
{
ScoreText.text = "LEVEL: " + InfinityRunner.escalation + "-" + InfinityRunner.level;
TimeText.text = "TIME: " + Mathf.Round(InfinityRunner.fullTime);
}
}
public void LoadHubWorld()
@@ -150,6 +162,11 @@ public class PauseMenu : MonoBehaviour
SceneManager.LoadScene("Waypoint Race", LoadSceneMode.Single);
}
if(InfinityRunner.gameOver == true)
{
SceneManager.LoadScene("Infinity Runner", LoadSceneMode.Single);
}
}
public void Quit()