Merge remote-tracking branch 'origin/dev_nonearth' into dev_cyp
This commit is contained in:
commit
6c0d9f5dec
@ -925,7 +925,12 @@ public class UIManager : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (eventTriggerType == EventTriggerType.PointerClick)
|
||||
{
|
||||
var audioSource = gameObject.GetComponent<AudioSource>();
|
||||
if (audioSource != null)
|
||||
audioSource.PlayOneShot(buttonClip);
|
||||
}
|
||||
call(e);
|
||||
});
|
||||
|
||||
@ -940,18 +945,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) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user