private void Awake() { gameManager.SetLevelResultCallbacks(score => { SetScoreText(score); successPanel.Show(); }, (score, bestScore) => { SetScoreText(score); gameOverPanel.SetScoreTexts(score, bestScore); gameOverPanel.Show(); }); nextLevelButton.onClick.AddListener(() => { successPanel.Hide(); gameManager.StartNextLevel(); }); resetGameButton.onClick.AddListener(() => { gameOverPanel.Hide(); gameManager.ResetGame(); SetScoreText(gameManager.Score); }); successPanel.Hide(); gameOverPanel.Hide(); }
public void Deactivate(bool forward) { if (TransportWorker.IsBusy) { TransportWorker.CancelAsync(); } if (!forward) { ErrorPanel.Hide(); SuccessPanel.Hide(); FinishedInfoLabel.Hide(); MainForm.Instance.FinishEnabled = false; } }