17 lines
411 B
C#
17 lines
411 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class RingCatcher : MonoBehaviour
|
|
{
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.CompareTag("Ring"))
|
|
{
|
|
AudioSource source = other.gameObject.GetComponentInParent<AudioSource>();
|
|
source.Play();
|
|
Destroy(other.gameObject);
|
|
}
|
|
}
|
|
}
|