Beispiel #1
0
 public void Excute(TEvent evt)
 {
     if (OnEvent != null)
     {
         this.OnEvent(evt);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 发送事件
        /// </summary>
        /// <param name="evt">Evt.</param>
        /// <param name="gameObject">Game object.</param>
        public void dispatchEvent(TEvent evt, object gameObject)
        {
            NEventListener eventListener = eventListenerDict[evt.eventType];

            if (eventListener == null)
            {
                return;
            }

            evt.target = gameObject;
            eventListener.Excute(evt);
        }