Beispiel #1
0
 /// <summary>
 /// 触发事件
 /// </summary>
 /// <param name="eventName"></param>
 public virtual void TriggerEvent(string eventName, EventParamete parameteData=null)
 {
     EventObject eventObject = eventObjects.Find(e => e.eventName == eventName);
     if (eventObject == null)
     {
         Debug.Log(string.Concat("事件《{0}》不存在", eventName));
     }
     else
     {
         if (parameteData == null)
             parameteData = new EventParamete();
         parameteData.EvendName = eventName;
         eventObject.eventCall(parameteData);//传入参数,执行回调  
     }
 }