Have controller support fully working for current main menu and halfway functional for all pause screens

This commit is contained in:
Gregory Campbell
2020-01-27 21:34:58 -05:00
parent bb13bb930e
commit 7436ca32c9
6 changed files with 129 additions and 29 deletions
+8
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using TMPro;
using UnityEngine.EventSystems;
public class PauseMenu : MonoBehaviour
{
@@ -17,6 +18,9 @@ public class PauseMenu : MonoBehaviour
public TextMeshProUGUI TimeText;
public TextMeshProUGUI LivesText;
public GameObject pauseFirstButton;
public GameObject gameOverFirstButton;
// Update is called once per frame
void Update()
{
@@ -59,6 +63,8 @@ public class PauseMenu : MonoBehaviour
pauseMenuUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
EventSystem.current.SetSelectedGameObject(null);
EventSystem.current.SetSelectedGameObject(pauseFirstButton);
}
void GameOver()
@@ -69,6 +75,8 @@ public class PauseMenu : MonoBehaviour
gameOverUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
EventSystem.current.SetSelectedGameObject(null);
EventSystem.current.SetSelectedGameObject(gameOverFirstButton);
if(FloorLevel.gameOver == true)
{