class StaticEventHandler : Object native { virtual native void WorldLoaded(); virtual native void WorldUnloaded(); virtual native void WorldThingSpawned(); virtual native void RenderFrame(); } class StaticRenderEventHandler : StaticEventHandler native { // for frame and camera native readonly Vector3 ViewPos; native readonly double ViewAngle; native readonly double ViewPitch; native readonly double ViewRoll; native readonly double FracTic; native readonly Actor Camera; } class StaticWorldEventHandler : StaticEventHandler native { // for world native readonly bool IsSaveGame; // this is set to true if static WorldLoaded was triggered during savegame loading. native readonly Actor Thing; // this is for WorldThingSpawned } class EventHandler : StaticEventHandler native { static native StaticEventHandler Create(class type); static native StaticEventHandler CreateOnce(class type); static native StaticEventHandler Find(class type); static native bool Register(StaticEventHandler handler); static native bool Unregister(StaticEventHandler handler); } class RenderEventHandler : StaticRenderEventHandler native { }