void OnDoubleClick() { if (doubleClick.IsNotEmpty()) { AudioBridge.Play(doubleClick); } }
void OnClick() { if (click.IsNotEmpty()) { AudioBridge.Play(click); } }
void OnSelect(bool selected) { if (selected && select.IsNotEmpty()) { AudioBridge.Play(select); } else if (!selected && deselect.IsNotEmpty()) { AudioBridge.Play(deselect); } }
void OnPress(bool pressed) { if (pressed && press.IsNotEmpty()) { AudioBridge.Play(press); } else if (!pressed && release.IsNotEmpty()) { AudioBridge.Play(release); } }
void OnHover(bool isOver) { if (isOver && hoverOver.IsNotEmpty()) { AudioBridge.Play(hoverOver); } else if (!isOver && hoverOut.IsNotEmpty()) { AudioBridge.Play(hoverOut); } }
protected virtual void PlayAudio() { #if NGUI_AUDIO AudioBridge.Play(GetType().Name); #endif }