GameVsJam/3d Prototyp/Assets/Scripts/Interaction/Copier.cs

19 lines
374 B
C#

using UnityEngine;
namespace Interaction
{
public class Copier : MonoBehaviour
{
public AudioSource _audioSource;
public AudioClip _deny;
public void Copy()
{
if (!_audioSource.isPlaying)
_audioSource.Play();
else
_audioSource.PlayOneShot(_deny);
}
}
}