コード例 #1
0
 public void addEvent(string a_eventName , DelegateWarapper.GameEventHandler a_eventHandler)
 {
     if(a_eventName != string.Empty && a_eventName !="")
     {
         if (!isAlReadyEventExists(a_eventName))
         {
             DelegateWarapper eventWrapper = new DelegateWarapper();
             m_eventTable[a_eventName] = eventWrapper;
             eventWrapper.RaiseCustomEvent += a_eventHandler;
         }
         else
         {
             DelegateWarapper eventWrapper = (DelegateWarapper)m_eventTable[a_eventName];
             eventWrapper.RaiseCustomEvent += a_eventHandler;
         }
     }
     else
     {
         Debug.Log("Event is not added ");
     }
    
 }
コード例 #2
0
 public void addEventListener(string a_eventName, DelegateWarapper.GameEventHandler a_eventHandler)
 {
     m_eventManager.addEvent(a_eventName, a_eventHandler);
 }