add project files

This commit is contained in:
Boris Nikolaev
2026-08-14 01:58:31 +03:00
parent 9134cad79b
commit 5f1e94b653
4399 changed files with 12286903 additions and 0 deletions
@@ -0,0 +1,30 @@
using UnityEngine;
using UnityEngine.UI;
public class ButtonClickSound : MonoBehaviour
{
public bool collectButton;
private void Start()
{
ButtonSoundsController controller = ButtonSoundsController.Instance;
if (controller == null)
{
return;
}
Button button = GetComponent<Button>();
if (button != null)
{
button.onClick.AddListener(controller.OnButtonClick);
return;
}
Toggle toggle = GetComponent<Toggle>();
if (toggle != null)
{
toggle.onValueChanged.AddListener(delegate
{
controller.OnButtonClick();
});
}
}
}