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

19 lines
374 B
C#
Raw Permalink Normal View History

2024-04-07 00:09:53 +02:00
using UnityEngine;
namespace Interaction
{
public class Copier : MonoBehaviour
{
2024-04-09 01:23:14 +02:00
public AudioSource _audioSource;
public AudioClip _deny;
2024-04-07 00:09:53 +02:00
public void Copy()
{
2024-04-09 01:23:14 +02:00
if (!_audioSource.isPlaying)
_audioSource.Play();
else
_audioSource.PlayOneShot(_deny);
2024-04-07 00:09:53 +02:00
}
}
}