diff --git a/.erp b/.erp index 86ac332..9eb8ec4 100644 --- a/.erp +++ b/.erp @@ -5,7 +5,7 @@ false false true - 1677889305 + 1677890269 2115309888051293429 false \ No newline at end of file diff --git a/Assets/Scripts/SoundManager.cs b/Assets/Scripts/SoundManager.cs index 2d3e2ec..fff6e17 100644 --- a/Assets/Scripts/SoundManager.cs +++ b/Assets/Scripts/SoundManager.cs @@ -85,6 +85,11 @@ public class SoundManager : MonoBehaviour PlaySound(audioClipsRefsSO.warning, Vector3.zero); } + public void PlayWarningSound(Vector3 position) + { + PlaySound(audioClipsRefsSO.warning, position); + } + public void ChangeVolume() { volume += .1f; diff --git a/Assets/Scripts/StoveCounterSound.cs b/Assets/Scripts/StoveCounterSound.cs deleted file mode 100644 index 1df229b..0000000 --- a/Assets/Scripts/StoveCounterSound.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class StoveCounterSound : MonoBehaviour -{ - - [SerializeField] private StoveCounter stoveCounter; - private AudioSource audioSource; - - private void Awake() - { - audioSource = GetComponent(); - } - - private void Start() - { - stoveCounter.OnStateChanged += StoveCounter_OnStateChanged; - } - - private void StoveCounter_OnStateChanged(object sender, StoveCounter.OnStateChangedEventArgs e) - { - bool playSound = e.state == StoveCounter.State.Frying || e.state == StoveCounter.State.Fried; - - if (playSound) - { - audioSource.Play(); - } else - { - audioSource.Pause(); - } - } -} diff --git a/Assets/Scripts/StoveCounterSound.cs.meta b/Assets/Scripts/StoveCounterSound.cs.meta deleted file mode 100644 index d625e23..0000000 --- a/Assets/Scripts/StoveCounterSound.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a58f05adbbecd024eacd08f86e3c175c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: