Example #1
0
    void OnCollisionEnter2D(Collision2D col)
    {
        if (col.gameObject.tag == "backwall")
        {
            ballScoreManager.blop.Play();
            ballScoreManager.myScore++;
            ballScoreManager.ResetBall();
        }
        else if (col.gameObject.tag == "justawall")
        {
            ballScoreManager.blop.Play();
            ballScoreManager.aiScore++;
            ballScoreManager.ResetBall();
        }

        else
        {
            ballScoreManager.blip.Play();
        }

        ballScoreManager.SetScore();
    }