2017-01-22 02:15:30 +00:00
|
|
|
class EventHandler : Object native
|
|
|
|
{
|
|
|
|
static native EventHandler Create(class<EventHandler> type);
|
|
|
|
static native EventHandler CreateOnce(class<EventHandler> type);
|
|
|
|
static native EventHandler Find(class<EventHandler> type);
|
|
|
|
|
|
|
|
static native bool Register(EventHandler handler);
|
|
|
|
static native bool Unregister(EventHandler handler);
|
|
|
|
|
|
|
|
virtual native void MapLoaded();
|
|
|
|
virtual native void MapUnloading();
|
|
|
|
|
|
|
|
virtual native void RenderFrame();
|
|
|
|
virtual native void RenderCamera();
|
2017-01-22 05:04:35 +00:00
|
|
|
virtual native void RenderBeforeThing();
|
|
|
|
virtual native void RenderAfterThing();
|
2017-01-22 02:15:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class RenderEventHandler : EventHandler native
|
|
|
|
{
|
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
|
|
|
// for camera
|
|
|
|
native readonly Actor Camera;
|
|
|
|
// for thing
|
|
|
|
native readonly Actor CurrentThing;
|
2017-01-22 02:15:30 +00:00
|
|
|
}
|