bug fixes

This commit is contained in:
djkellerman
2025-03-07 11:56:19 -05:00
parent 1a653d81b5
commit 9c5ba04216
4 changed files with 39 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class GameManager : MonoBehaviour
{
@@ -77,6 +78,7 @@ public class GameManager : MonoBehaviour
if (player.lives <= 0)
{
GameOver(player.gameObject);
Destroy(player.gameObject);
}
else
{
@@ -106,7 +108,7 @@ public class GameManager : MonoBehaviour
private void GameOver(GameObject player)
{
// Add game over screen
Destroy(player);
player.SetActive(false);
if (AlivePlayers().Count <= 1)
{