private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "spawner" && (global.GetLineOver() == true || isGameStarted == false)) { SetZeroSpeed(); if (isGameStarted == true) { global.MoveAll(); score.IncreaseScore(); score.PlayAnimationOfUpdating(); score.UpdateScoreText(); if (PlayerPrefs.GetInt("sound", 0) == 1) { GetComponent <AudioSource>().Play(); } } isGameStarted = true; transform.SetParent(collision.transform); } else if (collision.tag == "gameOver") { SetZeroSpeed(); global.GameOver(); collision.transform.parent.GetComponent <LineController>().GameOverRotate(); } }