/* #################################################################### */ /* # METHODS # */ /* #################################################################### */ public void Run() { SDLWindow.Instance.Start(); SDLRenderer.Instance.Start(); bool keepRunning = true; while (keepRunning) { Time.Update(); SDLEvent.Update(); // This should be updated early, to make sure inputs are available to later activities. SDLWindow.Instance.Update(); // This needs to be called before anything that might draw anything, as it clears the backbuffer. MouseController.Instance.Update(); CameraController.Instance.Update(); WorldController.Instance.Update(); WorldController.Instance.Render(); MouseController.Instance.Render(); CameraController.Instance.Render(); SDLWindow.Instance.Present(); if (SDLEvent.Quit || SDLEvent.KeyUp(SDL2.SDL.SDL_Keycode.SDLK_ESCAPE)) { keepRunning = false; } } }
public virtual void Update() { Time.Update(); Layer.Attached.Update(Time.FrameTime); #if DEBUG Time.UpdateFinished(); #endif }