public void Checking() { if (_isCanEat) { GameController.instance.AddingScore(1); } else { gameObject.SetActive(false); GameController.instance.GameOver(); } BananaSpawn.BackToPoll(gameObject); }
private void Update() { if (GameController.instance.isGameOver) { gameObject.SetActive(false); BananaSpawn.BackToPoll(gameObject); } if (!_isCanEat) { _time -= Time.deltaTime; if (_time <= 0) { BananaSpawn.BackToPoll(gameObject); } } }