예제 #1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Pick Up"))
        {
            audio.Play();
            other.gameObject.SetActive(false);
            score += 1;
            scoringScript.SetScore(playerNumber, score);
        }

        if (other.gameObject.CompareTag("Wall"))
        {
            outOfBoundsView.SetActive(true);
        }
        else
        {
        }
    }