Caught the main modules up to new module script file paradigm

Have initServer only get called when a server is actually started for the first time
Added utility method callGamemodeFunction to streamline exec'ing of gamemode function calls
Added onClientConnect gamemode function, called when the client establishes the connection
Added onInitialControlSet gamemode function, called when the client actively gains control in the game, to allow gamemodes to special override GUI settings or input commands
Cleaned up init'ng of the engine so stock UI module isn't required to trip configuration of the canvas
Added fallback so if nothing set the main content control for the UI after boot, we attempt to set the defined mainMenuGUI, on the chance nothing explicitly sets it on load
This commit is contained in:
Areloch 2019-09-02 16:13:24 -05:00
parent d720eb8ccd
commit 99cee7f32a
21 changed files with 358 additions and 386 deletions

View file

@ -31,7 +31,7 @@ function ExampleModule::onDestroy(%this)
//Are called during the startup, shut down, and resetting of any and all active gamemodes, as informed by the loaded scenes
//when the game server is processed.
//These callbacks are activated in core/clientServer/scripts/server/levelLoad.cs
function FPSGameplay::initServer(%this)
function ExampleModule::initServer(%this)
{
//This script contains our ExampleGameMode logic
exec("./scripts/ExampleGamemodeScript.cs");