public void StartButton() { levels.Init(); ShowShape(); UnityEvent nextLevelEvent = new UnityEvent(); nextLevelEvent.AddListener(() => ShowShape()); nextLevelEvent.AddListener(() => Win()); mouse.nextLevel = nextLevelEvent; mouse.SetData(levels.GetDataShape()); objectsGame.buttonStart.gameObject.SetActive(false); gameOverObject.SetActive(false); GameData.score = 0; score.SetScore(); GameData.gameAction = GameData.GameAction.Game; }
public void Lose() { GameData.gameAction = GameData.GameAction.Start; second = _second; objectsGame.cursor.DeActiveParticle(); gameOverScore.SetScore(); gameOverObject.SetActive(true); StartData(); }