public void Excute(TEvent evt) { if (OnEvent != null) { this.OnEvent(evt); } }
/// <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); }