コード例 #1
0
ファイル: FageEventDispatcher.cs プロジェクト: buzzler/titan
 public void RemoveEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey (type)) {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler -= func;
         event_hash [type] = handler;
     }
 }
コード例 #2
0
 public void RemoveEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey(type))
     {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler          -= func;
         event_hash [type] = handler;
     }
 }
コード例 #3
0
 public void DispatchEvent(FageEvent fevent)
 {
     if ((fevent != null) && event_hash.ContainsKey(fevent.type))
     {
         FageEventHandler handler = event_hash [fevent.type] as FageEventHandler;
         if (handler != null)
         {
             handler(fevent);
         }
     }
 }
コード例 #4
0
ファイル: FageEventDispatcher.cs プロジェクト: buzzler/titan
 public void AddEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey (type)) {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler += func;
         event_hash [type] = handler;
     } else {
         dummy += func;
         FageEventHandler handler = dummy.Clone() as FageEventHandler;
         dummy -= func;
         event_hash.Add (type, handler);
     }
 }
コード例 #5
0
 public void AddEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey(type))
     {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler          += func;
         event_hash [type] = handler;
     }
     else
     {
         dummy += func;
         FageEventHandler handler = dummy.Clone() as FageEventHandler;
         dummy -= func;
         event_hash.Add(type, handler);
     }
 }