some more puzzle sounds

This commit is contained in:
2023-05-16 15:01:06 +02:00
parent de10513161
commit 7a8e945f81
25 changed files with 1477 additions and 15 deletions

View File

@@ -0,0 +1,27 @@
using NaughtyAttributes;
using UnityEngine;
namespace Station46.Scripts
{
[RequireComponent(typeof(Button))]
public class ButtonSound : MonoBehaviour
{
[BoxGroup("Internal")] public AudioSource audioSource;
private void Awake()
{
audioSource.loop = false;
}
private void Start()
{
GetComponent<Button>().ButtonEvent += (_, type) =>
{
if (type == ButtonEventType.Pressed)
{
audioSource.Play();
}
};
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d6481047d71944108dc1d729ad344648
timeCreated: 1684240044