2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows:
|
|
|
|
|
|
|
|
|
|
// First, a client will always create a server in the event that they want to host a single player
|
|
|
|
|
// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff
|
|
|
|
|
// in the networking short-circuited to sidestep around lag and packet transmission times.
|
|
|
|
|
|
|
|
|
|
// initServer() is called, loading the default server scripts.
|
|
|
|
|
// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called
|
|
|
|
|
// to prep a playable client session.
|
|
|
|
|
|
|
|
|
|
// 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().
|
|
|
|
|
|
2019-09-02 16:13:24 -05:00
|
|
|
function UI::onCreate( %this )
|
2017-02-24 02:40:56 -06:00
|
|
|
{
|
2019-09-13 00:27:48 -05:00
|
|
|
%bool = true;
|
2019-08-29 00:22:33 -05:00
|
|
|
}
|
|
|
|
|
|
2019-09-02 16:13:24 -05:00
|
|
|
function UI::onDestroy( %this )
|
2019-08-29 00:22:33 -05:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function UI::initServer(%this){}
|
|
|
|
|
|
2019-09-02 16:13:24 -05:00
|
|
|
function UI::onCreateGameServer(%this){}
|
2019-08-29 00:22:33 -05:00
|
|
|
|
2019-09-02 16:13:24 -05:00
|
|
|
function UI::onDestroyGameServer(%this){}
|
2019-08-29 00:22:33 -05:00
|
|
|
|
|
|
|
|
function UI::initClient(%this)
|
|
|
|
|
{
|
2017-02-24 02:40:56 -06:00
|
|
|
//Load UI stuff
|
|
|
|
|
//we need to load this because some of the menu profiles use the sounds here
|
2019-09-13 00:27:48 -05:00
|
|
|
//exec("./datablocks/guiSounds.cs");
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
//Profiles
|
|
|
|
|
exec("./scripts/profiles.cs");
|
|
|
|
|
|
|
|
|
|
//Now gui files
|
2019-08-29 00:22:33 -05:00
|
|
|
exec("./guis/mainMenu.gui");
|
|
|
|
|
exec("./guis/mainMenu.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/chooseLevelDlg.gui");
|
|
|
|
|
exec("./guis/chooseLevelDlg.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/joinServerMenu.gui");
|
|
|
|
|
exec("./guis/joinServerMenu.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/loadingGui.gui");
|
|
|
|
|
|
|
|
|
|
exec("./guis/optionsMenu.gui");
|
|
|
|
|
exec("./guis/optionsMenu.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/pauseMenu.gui");
|
|
|
|
|
exec("./guis/pauseMenu.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/remapDlg.gui");
|
|
|
|
|
exec("./guis/remapConfirmDlg.gui");
|
|
|
|
|
|
|
|
|
|
exec("./guis/profiler.gui");
|
|
|
|
|
exec("./guis/profiler.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/netGraphGui.gui");
|
|
|
|
|
exec("./guis/RecordingsDlg.gui");
|
|
|
|
|
|
|
|
|
|
//exec("./guis/FileDialog.gui");
|
|
|
|
|
//exec("./guis/FileDialog.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/guiMusicPlayer.gui");
|
|
|
|
|
exec("./guis/guiMusicPlayer.cs");
|
|
|
|
|
|
|
|
|
|
exec("./guis/startupGui.gui");
|
|
|
|
|
exec("./guis/startupGui.cs");
|
|
|
|
|
|
|
|
|
|
//Load scripts
|
2017-02-24 02:40:56 -06:00
|
|
|
exec("./scripts/optionsList.cs");
|
2019-09-06 00:00:17 -05:00
|
|
|
exec("./scripts/displayMenu.cs");
|
2017-02-24 02:40:56 -06:00
|
|
|
exec("./scripts/graphicsMenu.cs");
|
|
|
|
|
exec("./scripts/controlsMenu.cs");
|
2019-09-06 00:00:17 -05:00
|
|
|
exec("./scripts/audioMenu.cs");
|
2017-02-24 02:40:56 -06:00
|
|
|
exec("./scripts/messageBoxes.cs");
|
2017-03-26 17:53:01 -05:00
|
|
|
exec("./scripts/help.cs");
|
|
|
|
|
exec("./scripts/cursors.cs");
|
2017-02-24 02:40:56 -06:00
|
|
|
|
2019-09-13 00:27:48 -05:00
|
|
|
exec("./guis/menuGraphics.gui");
|
|
|
|
|
exec("./guis/menuGraphics.cs");
|
|
|
|
|
|
2019-08-29 00:22:33 -05:00
|
|
|
//exec("./scripts/GuiTreeViewCtrl.cs");
|
2017-02-24 02:40:56 -06:00
|
|
|
|
2017-03-27 00:36:23 -05:00
|
|
|
loadStartup();
|
2017-02-24 02:40:56 -06:00
|
|
|
}
|
|
|
|
|
|
2019-08-29 00:22:33 -05:00
|
|
|
function UI::onCreateClientConnection(%this){}
|
|
|
|
|
|
|
|
|
|
function UI::onDestroyClientConnection(%this){}
|