private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { if (!collisionFound) { collisionFound = !collisionFound; //timer of ball lifetime after throw levelGenerator.StopRunTimer(); levelGenerator.AddPoint(); animator.Play("Goal"); } } }