// Start is called before the first frame update void Start() { Invoke("UpdateUI", 0.2f); NextLevelEvent += OnNextLevel; RestartEvent += OnRestart; }
void Start() { //Find the delegate GameObject managers = GameObject.Find("Managers"); _delegate = managers.GetComponent <GameManagerDelegate>(); _dice1.SetUp(this); _dice2.SetUp(this); _scoreManager = new ScoreManager(); _dice1.Reset(); _dice2.Reset(); ShowControls(true); _gameOverMenu.Hide(); }
public void OnRestart() { if (levelData) { levelData.totalDeaths++; } if (PlayerController.local) { if (PlayerController.local.data.checkPoint) { data.checkPointUsed = true; } } NextLevelEvent -= OnNextLevel; RestartEvent -= OnRestart; }