Fix GameManager

This commit is contained in:
RochesterX
2025-03-04 20:10:28 -05:00
parent 1ccf8d0d5b
commit 6bf9825855

View File

@@ -7,6 +7,18 @@ public class GameManager : MonoBehaviour
public int maxLives = 3; public int maxLives = 3;
public int currentLives; public int currentLives;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Destroy(gameObject);
}
}
private void Start() private void Start()
{ {
StartGame(); StartGame();