2023-10-23 11:19:20 +03:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class MonumentPreviewSound : MonoBehaviour
|
|
|
|
{
|
2023-10-30 13:54:38 +03:00
|
|
|
private SoundEmitter _emitter;
|
2023-10-23 11:19:20 +03:00
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
2023-10-30 13:54:38 +03:00
|
|
|
_emitter = GetComponent<SoundEmitter>();
|
2023-10-23 11:19:20 +03:00
|
|
|
}
|
|
|
|
|
2023-10-30 13:54:38 +03:00
|
|
|
public void PlaySound(AudioClip sound)
|
2023-10-23 11:19:20 +03:00
|
|
|
{
|
2023-10-30 13:54:38 +03:00
|
|
|
_emitter.Sound.Clip = sound;
|
|
|
|
_emitter.Play();
|
2023-10-23 11:19:20 +03:00
|
|
|
}
|
|
|
|
}
|