Fix GameManager
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user