CoronaRuntime Class |
Runtime used to run a Corona project and manage its lifetime via its suspend, resume, and terminate methods and events.
You would not normally create a CoronaRuntime instance yourself. Instead, you would use a Corona runtime object provided by a "CoronaLabs.Corona.WinRT.Phone.CoronaPanel" Xaml control.
Namespace: CoronaLabs.Corona.WinRT
The CoronaRuntime type exposes the following members.
Name | Description | |
---|---|---|
CoronaRuntime | Creates a new Corona runtime with the given interop settings. |
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Resume | Resumes the runtime, if currently suspended. This will raise an "applicationResume" system event in Lua. | |
Run | Starts executing the "resource.car" or "main.lua" file found under the default resource directory specified by the DefaultResourceDirectoryPath property. If the runtime is currently executing a Corona project, then it will be terminated before running a new one. | |
Run(String) | Starts the Corona runtime by executing the given *.lua or *.car file. If the runtime is currently executing a Corona project, then it will be terminated before running a new one. | |
RunInDirectory | Starts the Corona runtime by using the given path as the resource directory and executing the "resource.car" or "main.lua" file found it it. If the runtime is currently executing a Corona project, then it will be terminated before running a new one. | |
RunUsing | Starts the Corona runtime using the given launch settings. If the runtime is currently executing a Corona project, then it will be terminated before running a new one. | |
Suspend | Suspends/pauses the runtime, if currently running. This will raise an "applicationSuspend" system event in Lua. | |
Terminate | Exits and destroys the runtime, if not done already. This will raise an "applicationExit" system event in Lua. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
State | Indicates if the Corona runtime is currently running, suspended, terminated, etc. |
Name | Description | |
---|---|---|
Loaded | Raised after loading the "config.lua" file and just but before executing the "main.lua" file. This is the application's opportunity to register custom APIs into Lua. | |
Resumed | Raised when the Corona runtime has been resumed after a suspend. | |
Started | Raised just after the "main.lua" file has been executed by the Corona runtime. | |
Suspended | Raised when the Corona runtime has been suspended which pauses all rendering, audio, timers and other Corona related operations. This is typically raised when the end-user navigates to another app or when the power button has been pressed. | |
Terminating | Raised just before the Corona runtime environment is about to be terminated. This typically happens when the end-user backs out of the app, the Corona XAML control has been unloaded from the page, or when the runtime's Terminate() method has been called. |