public static T ShowPopup <T> (string name, IModalMaskType maskType = IModalMaskType.NonMasked, CocoAudioID audioID = CocoAudioID.None) { CocoAudio.PlaySound(audioID); AppModalHandle modalHandle = CocoMainController.Instance.popManager.Add(new AppModalHandle(name, maskType), true) as AppModalHandle; return(modalHandle.AppModalView.GetComponentInChildren <T>(true)); }
protected override void OnButtonPress(bool press) { if (m_AnimationEnable) { if (!IsTouchEnabled) { return; } float scale = press ? 1f : 0.8f; transform.localScale = DefaultScale * scale; LeanTween.cancel(gameObject); if (!press) { PlayPingpong(); } else { if (clickAudio.FirstUsed) { CocoAudio.PlaySound(clickAudio.First); } else { CocoAudio.PlaySound(clickAudio.Second); } } } else { base.OnButtonPress(press); } }
public void PlayTapSound() { if (clickAudio.FirstUsed) { CocoAudio.PlaySound(clickAudio.First); } else { CocoAudio.PlaySound(clickAudio.Second); } }
public override void Execute() { //Debug.LogErrorFormat ("SoundManager->CocoAudioMuteCommand.Execute: mute {1}", GetType ().Name, mute); CocoAudio.MuteAll(mute); }
/// <summary> /// Shows the popup. /// </summary> /// <param name="name">Name.</param> /// <param name="maskType">Mask type.</param> public static void ShowPopup(string name, IModalMaskType maskType = IModalMaskType.NonMasked, CocoAudioID audioID = CocoAudioID.None) { CocoAudio.PlaySound(audioID); CocoMainController.Instance.popManager.Add(new AppModalHandle(name, maskType), true); }