音效微调

This commit is contained in:
lishuo 2021-12-16 18:27:50 +08:00
parent b9d14a590c
commit 77989384fc

View File

@ -912,7 +912,12 @@ public class UIManager : MonoBehaviour
{
return;
}
if (eventTriggerType == EventTriggerType.PointerClick)
{
var audioSource = gameObject.GetComponent<AudioSource>();
if (audioSource != null)
audioSource.PlayOneShot(buttonClip);
}
call(e);
});
@ -927,18 +932,18 @@ public class UIManager : MonoBehaviour
//设置点击音效
if (buttonClip == null)
{
buttonClip = Resources.Load<AudioClip>("audio/dundundun");
buttonClip = Resources.Load<AudioClip>("audio/高科技UI点击触控警告提示反馈APP菜单UI-很酷的应用程序_爱给网_aigei_com");
}
var audioSource = gameObject.GetComponent<AudioSource>();
if (audioSource == null)
{
audioSource = gameObject.AddComponent<AudioSource>();
}
audioSource.volume = 0.5f;
UIManager.AddEvent(gameObject, EventTriggerType.PointerEnter, (e) =>
{
//if (!gameObject.activeInHierarchy) return;
audioSource.PlayOneShot(buttonClip);
Cursor.SetCursor(cursor, Vector2.zero, CursorMode.Auto);
});
UIManager.AddEvent(gameObject, EventTriggerType.PointerUp, (e) =>