/// <remarks> The default behavior is to handle the event then propigate to any children. </remarks> public virtual void BroadcastEvent(NodeEvent eventValue) { if (!eventValue.IsHandled) { HandleEvent(eventValue); if (!eventValue.IsHandled) { eventValue.Handle(this); if (!eventValue.IsHandled) { foreach (Node child in Children) { child.BroadcastEvent(eventValue); if (eventValue.IsHandled) { break; } } } } } }
/// <remarks> Override to handle an event. </remarks> public virtual void HandleEvent(NodeEvent eventValue) { }