示例#1
0
 public static void NotifyListeners(UIContext uiContext)
 {
     foreach (var listener in globalListeners)
     {
         uiContext.CheckListener(listener);
     }
     NotifyListenersAndChildren(uiContext, focusedObject);
 }
示例#2
0
 private static void NotifyListenersAndChildren(UIContext uiContext, ZComponent obj)
 {
     if (obj != null)
     {
         foreach (var listener in obj.listeners.ToList())
         {
             uiContext.CheckListener(listener);
         }
     }
     if (obj is ZGameObject)
     {
         foreach (var child in ((ZGameObject)obj).children)
         {
             NotifyListenersAndChildren(uiContext, child);
         }
     }
 }