def __RenderUpdate(): glLoadIdentity() glClearColor(Camera.clearColor.x, Camera.clearColor.y, Camera.clearColor.z, 1.) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) screenRatio = glutGet(GLUT_WINDOW_WIDTH) / glutGet(GLUT_WINDOW_HEIGHT) if FLAT_WORLD: glOrtho(-Camera.size * screenRatio, Camera.size * screenRatio, -Camera.size, Camera.size, Camera.near, -Camera.far) Camera.applyTransformation() else: gluPerspective(Camera.fov, screenRatio, Camera.near, Camera.far) Camera.applyTransformation() EventManager.castRender() glutSwapBuffers()
def __FrameUpdate(): EventManager.castUpdate()
def __LateFrameUpdate(): EventManager.castLateUpdate()
def Start(): __init() EventManager.loadScripts() EventManager.castStart() glutMainLoop()
def instantiate(prefab_name): return EventManager.__HookMethods('UserAssets.Prefabs.' + prefab_name)
def enable(script_id): EventManager.__EnableScript(script_id)
def disable(script_id): EventManager.__DisableScript(script_id)
def destroy(script_id): EventManager.__UnHookScript(script_id)