示例#1
0
    private void OnCollisionEnter(Collision collision)
    {
        GameObject selectedApple = collision.gameObject;

        if (selectedApple.CompareTag(targetTag))
        {
            scoreCounter.AddCurrentScore(appleScore);
            Destroy(selectedApple);
        }
    }