Пример #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Bottom")
        {
            deathAudio.Play();

            if (!gameManager.endless)
            {
                livesController.RemoveLife();
            }

            paddleController.StartCoroutine("SpawnNewBall");
            Destroy(transform.parent.gameObject);
        }
        else
        {
            collisionAudio.Play();
        }
    }