|
@@ -1,6 +1,7 @@
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
+using UnityEngine.UI;
|
|
|
using Sirenix.OdinInspector;
|
|
|
using KairoEngine.SFX;
|
|
|
using UnityEngine.EventSystems;
|
|
@@ -10,6 +11,7 @@ namespace KairoEngine.UI.SFX
|
|
|
[HideMonoScript]
|
|
|
public class ButtonSFX : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler
|
|
|
{
|
|
|
+ public Button button;
|
|
|
public SFXClip onPointerEnterSFX;
|
|
|
public SFXClip onPointerExitSFX;
|
|
|
public SFXClip onPointerDownSFX;
|
|
@@ -71,6 +73,10 @@ namespace KairoEngine.UI.SFX
|
|
|
{
|
|
|
if(clip == null) return;
|
|
|
if(this.gameObject.activeInHierarchy == false) return;
|
|
|
+ if(button != null)
|
|
|
+ {
|
|
|
+ if(button.interactable == false) return;
|
|
|
+ }
|
|
|
SoundController.EmmitSound(clip, new Vector3());
|
|
|
|
|
|
}
|