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); } } }
public void Focus() { focusedObject = this; }