2017-01-22 06:56:57 +00:00
|
|
|
class StaticEventHandler : Object native
|
2017-01-22 02:15:30 +00:00
|
|
|
{
|
2017-01-23 22:17:12 +00:00
|
|
|
virtual native void WorldLoaded();
|
|
|
|
virtual native void WorldLoadedUnsafe();
|
|
|
|
virtual native void WorldUnloading();
|
|
|
|
virtual native void WorldUnloadingUnsafe();
|
2017-01-22 02:15:30 +00:00
|
|
|
|
|
|
|
virtual native void RenderFrame();
|
|
|
|
}
|
|
|
|
|
2017-01-22 06:56:57 +00:00
|
|
|
class StaticRenderEventHandler : StaticEventHandler native
|
2017-01-22 02:15:30 +00:00
|
|
|
{
|
2017-01-22 05:04:35 +00:00
|
|
|
// for frame and camera
|
2017-01-22 02:15:30 +00:00
|
|
|
native readonly Vector3 ViewPos;
|
|
|
|
native readonly double ViewAngle;
|
|
|
|
native readonly double ViewPitch;
|
|
|
|
native readonly double ViewRoll;
|
|
|
|
native readonly double FracTic;
|
2017-01-22 05:04:35 +00:00
|
|
|
native readonly Actor Camera;
|
2017-01-22 06:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class EventHandler : StaticEventHandler native
|
|
|
|
{
|
|
|
|
static native StaticEventHandler Create(class<StaticEventHandler> type);
|
|
|
|
static native StaticEventHandler CreateOnce(class<StaticEventHandler> type);
|
|
|
|
static native StaticEventHandler Find(class<StaticEventHandler> type);
|
|
|
|
|
|
|
|
static native bool Register(StaticEventHandler handler);
|
|
|
|
static native bool Unregister(StaticEventHandler handler);
|
|
|
|
}
|
|
|
|
|
|
|
|
class RenderEventHandler : StaticRenderEventHandler native { }
|