/// <summary>Dispatches an event to the event receiver, if there is one.</summary> public void dispatchEvent(string name) { if (EventReceiver == null) { return; } // Create the event: SpriteEvent se = new SpriteEvent(name); // Trusted but doesn't bubble: se.SetTrusted(false); // Apply this instance: se.instance = this; // Dispatch it now: EventReceiver.dispatchEvent(se); }