// Called when the engine has been started
function onEnter()
{
   // Set log mode to two
   setLogMode(2);

   // Attempt to build and load core, on error, quit
   if(!exec("core/entry.cs") || !loadCore())
      quitWithErrorMessage("A fatal error has occurred and the application must exit.");
}

// Called when engine has exited
function onExit()
{
   // Unload core
   unloadCore();
}

// Begin initialization
onEnter();