class lime.app.Application extends Module
Sub classes | ||||
Application |
|
The Application class forms the foundation for most Lime projects. It is common to extend this class in a main class. It is then possible to override "on" functions in the class in order to handle standard events that are relevant.
Class Fields
Instance Fields
var onUpdate:Event_Int_Void<Int ->Void>
Update events are dispatched each frame (usually just before rendering)
function addRenderer(renderer:Renderer): Void
Adds a new Renderer to the Application. By default, this is called automatically by create()
renderer | A Renderer object to add |
function create(config:Config): Void
Initializes the Application, using the settings defined in the config instance. By default, this is called automatically when building the project using Lime's command-line tools
config | A Config object |
function createWindow(window:Window): Void
Adds a new Window to the Application. By default, this is called automatically by create()
window | A Window object to add |
Execute the Application. On native platforms, this method blocks until the application is finished running. On other platforms, it will return immediately
returns | An exit code, 0 if there was no error |
function removeModule(module:IModule): Void
Removes a module from the Application
module | A module to remove |
function removeRenderer(renderer:Renderer): Void
Removes a Renderer from the Application
renderer | A Renderer object to remove |