コード例 #1
0
        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));
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public void PlayTapSound()
 {
     if (clickAudio.FirstUsed)
     {
         CocoAudio.PlaySound(clickAudio.First);
     }
     else
     {
         CocoAudio.PlaySound(clickAudio.Second);
     }
 }
コード例 #4
0
 public override void Execute()
 {
     //Debug.LogErrorFormat ("SoundManager->CocoAudioMuteCommand.Execute:  mute {1}", GetType ().Name, mute);
     CocoAudio.MuteAll(mute);
 }
コード例 #5
0
 /// <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);
 }