29 lines
544 B
C#
29 lines
544 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class OnTriggerPot : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
string loeffelTag;
|
|
|
|
[SerializeField]
|
|
GameObject stirringSound;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.tag == loeffelTag)
|
|
{
|
|
stirringSound.SetActive(true);
|
|
}
|
|
}
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.tag == loeffelTag)
|
|
{
|
|
stirringSound.SetActive(false);
|
|
}
|
|
}
|
|
}
|