/// <summary>
 /// 去除事件绑定
 /// </summary>
 public void DetachEvent(eEventsKey strEventKey, CommonEvent attachEvent)
 {
     if (m_dicEvents.ContainsKey(strEventKey))
     {
         //Debug.Log("去除事件绑定 : " + strEventKey);
         m_dicEvents[strEventKey] -= attachEvent;
     }
     else
     {
         Debug.LogError("没有这个定义的事件:" + strEventKey);
     }
 }
Exemple #2
0
 /// <summary>
 /// 去除事件绑定
 /// </summary>
 public void DetachEvent(eEventsKey strEventKey, CommonEvent attachEvent)
 {
     if (m_dicEvents.ContainsKey(strEventKey))
     {
         //Debug.Log("去除事件绑定 : " + strEventKey);
         m_dicEvents[strEventKey] -= attachEvent;
     }
     else
     {
         Debug.LogError("没有这个定义的事件:" + strEventKey);
     }
 }
Exemple #3
0
 /// <summary>
 /// 事件触发
 /// </summary>
 public void TriigerEvent(eEventsKey key, object param)
 {
     if (m_dicEvents.ContainsKey(key))
     {
         //Debug.Log(" 事件回调 : " + key);
         m_dicEvents[key](param);
     }
     else
     {
         Debug.LogError("没有这个定义的事件:" + key);
     }
 }
 /// <summary>
 /// 事件触发
 /// </summary>
 public void TriigerEvent(eEventsKey key, object param)
 {
     if (m_dicEvents.ContainsKey(key))
     {
         //Debug.Log(" 事件回调 : " + key);
         m_dicEvents[key](param);
     }
     else
     {
         Debug.LogError("没有这个定义的事件:" + key);
     }
 }
 /// <summary>
 ///  添加一个回调事件
 /// </summary>
 private void AddDelegate(eEventsKey key)
 {
     //Debug.Log(" 添加一个回调 : "+ key);
     m_dicEvents.Add(key, delegate(object data) { });
 }
Exemple #6
0
 /// <summary>
 ///  添加一个回调事件
 /// </summary>
 private void AddDelegate(eEventsKey key)
 {
     //Debug.Log(" 添加一个回调 : "+ key);
     m_dicEvents.Add(key, delegate(object[] data) { });
 }