diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 5f96a35..082165b 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -7,6 +7,18 @@ public class GameManager : MonoBehaviour public int maxLives = 3; public int currentLives; + private void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Destroy(gameObject); + } + } + private void Start() { StartGame();