bugfixing

added canvas objects to all scenes (and event systems with them), game should be playable all the way through maybe!
This commit is contained in:
Sam
2023-04-30 22:01:55 -07:00
parent 743dc3d38a
commit 14a4de41cc
17 changed files with 5783 additions and 2266 deletions

View File

@@ -36,7 +36,7 @@ public class StateController : MonoBehaviour {
SceneManager.sceneLoaded += OnSceneLoaded;
if (inDebugMode) {
debugCanvas = GameObject.FindGameObjectWithTag("DebugCanvas");
debugCanvas = GameObject.Find("DebugCanvas");
debugCanvas.SetActive(false);
}
}
@@ -45,6 +45,9 @@ public class StateController : MonoBehaviour {
deathCanvas = GameObject.Find("DeathUICanvas");
if (deathCanvas != null) {
Button respawnButton = GameObject.Find("RespawnButton").GetComponent<Button>();
if (respawnButton == null) {
print("respawn button not found!");
}
respawnButton.onClick.AddListener(RespawnPlayer);
deathCanvas.SetActive(false);
}