예제 #1
0
        public static void OnClick(this GameObject go, QVoidDelegate.WithVoid callback)
        {
            QFramework.QUIEventListener.Get(go);

            var listener = QFramework.QUIEventListener.CheckAndAddListener(go);

            listener.onClick += callback;
        }
예제 #2
0
        public static void OnClick(this Transform trans, QVoidDelegate.WithVoid callback)
        {
            QFramework.UI.UGUIEventListener.Get(trans.gameObject);

            var listener = QFramework.UI.UGUIEventListener.CheckAndAddListener(trans.gameObject);

            listener.onClick += callback;
        }
예제 #3
0
        public static void OnClick(this MonoBehaviour behaviour, QVoidDelegate.WithVoid callback)
        {
            QFramework.UI.QUIEventListener.Get(behaviour.gameObject);

            var listener = QFramework.UI.QUIEventListener.CheckAndAddListener(behaviour.gameObject);

            listener.onClick += callback;
        }
예제 #4
0
 public AudioMsgPlayVoice(string voiceName,
                          QVoidDelegate.WithVoid onVoiceBeganCallback = null,
                          QVoidDelegate.WithVoid onVoiceEndedCallback = null) : base((ushort)AudioEvent.PlayVoice)
 {
     this.voiceName            = voiceName;
     this.onVoiceBeganCallback = onVoiceBeganCallback;
     this.onVoiceEndedCallback = onVoiceEndedCallback;
 }
예제 #5
0
 public AudioMsgPlaySound(ushort msgId,
                          string soundName,
                          QVoidDelegate.WithVoid onSoundBeganCallback = null,
                          QVoidDelegate.WithVoid onSoundEndedCallback = null) : base(msgId)
 {
     this.soundName            = soundName;
     this.onSoundBeganCallback = onSoundBeganCallback;
     this.onSoundEndedCallback = onSoundEndedCallback;
 }
예제 #6
0
 public AudioMsgPlayVoice(ushort msgId,
                          string voiceName,
                          QVoidDelegate.WithVoid onVoiceBeganCallback = null,
                          QVoidDelegate.WithVoid onVoiceEndedCallback = null) : base(msgId)
 {
     this.voiceName            = voiceName;
     this.onVoiceBeganCallback = onVoiceBeganCallback;
     this.onVoiceEndedCallback = onVoiceEndedCallback;
 }
예제 #7
0
 public AudioMsgPlayMusic(ushort msgId, string musicName, bool loop   = true,
                          QVoidDelegate.WithVoid onMusicBeganCallback = null,
                          QVoidDelegate.WithVoid onMusicEndedCallback = null) : base(msgId)
 {
     this.musicName            = musicName;
     this.loop                 = loop;
     this.onMusicBeganCallback = onMusicBeganCallback;
     this.onMusicEndedCallback = onMusicEndedCallback;
 }
예제 #8
0
 public AudioMsgPlayMusic(string musicName, bool loop = true, bool allowMusicOff = true,
                          QVoidDelegate.WithVoid onMusicBeganCallback = null,
                          QVoidDelegate.WithVoid onMusicEndedCallback = null) : base((ushort)AudioEvent.PlayMusic)
 {
     this.musicName            = musicName;
     this.loop                 = loop;
     this.allowMusicOff        = allowMusicOff;
     this.onMusicBeganCallback = onMusicBeganCallback;
     this.onMusicEndedCallback = onMusicEndedCallback;
 }
예제 #9
0
        private void MoveToNextUpdateFunc()
        {
            if (mCurrentNode != null)
            {
                mCurrentNode.OnEnd();
            }

            ++mCurrentIndex;
            if (mCurrentIndex >= mNodeList.Count)
            {
                mTotalSchedule = 1.0f;
                mCurrentNode   = null;

                if (OnExecuteContainerEndEvent != null)
                {
                    OnExecuteContainerEndEvent();

                    OnExecuteContainerEndEvent = null;
                }
            }
            else
            {
                mCurrentNode = mNodeList[mCurrentIndex];
                mCurrentNode.OnBegin();

                if (mCurrentIndex == 0)
                {
                    if (OnExecuteContainerBeginEvent != null)
                    {
                        OnExecuteContainerBeginEvent();
                    }
                }

                if (OnExecuteTipsEvent != null)
                {
                    OnExecuteTipsEvent(mCurrentNode.Tips);
                }
            }
        }