mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 04:45:31 +00:00
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:
parent
d720eb8ccd
commit
99cee7f32a
21 changed files with 358 additions and 386 deletions
|
|
@ -12,24 +12,19 @@
|
|||
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
|
||||
// connected to it via createAndConnectToLocalServer().
|
||||
|
||||
function UI::create( %this )
|
||||
function UI::onCreate( %this )
|
||||
{
|
||||
if ($Server::Dedicated)
|
||||
return;
|
||||
|
||||
// Use our prefs to configure our Canvas/Window
|
||||
configureCanvas();
|
||||
}
|
||||
|
||||
function UI::destroy( %this )
|
||||
function UI::onDestroy( %this )
|
||||
{
|
||||
}
|
||||
|
||||
function UI::initServer(%this){}
|
||||
|
||||
function UI::onCreateServer(%this){}
|
||||
function UI::onCreateGameServer(%this){}
|
||||
|
||||
function UI::onDestroyServer(%this){}
|
||||
function UI::onDestroyGameServer(%this){}
|
||||
|
||||
function UI::initClient(%this)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
VersionId="1"
|
||||
Description="Module that implements the menus for the game."
|
||||
ScriptFile="UI.cs"
|
||||
CreateFunction="create"
|
||||
DestroyFunction="destroy"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Game">
|
||||
</ModuleDefinition>
|
||||
Loading…
Add table
Add a link
Reference in a new issue