mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-25 15:19:30 +00:00
Initial implementation of the new Base Game Template and some starting modules.
This makes some tweaks to the engine to support this, specifically, it tweaks the hardcoded shaderpaths to defer to a pref variable, so none of the shader paths are hardcoded. Also tweaks how post effects read in texture files, removing a bizzare filepath interpretation choice, where if the file path didn't start with "/" it forcefully appended the script's file path. This made it impossible to have images not in the same dir as the script file defining the post effect. This was changed and the existing template's post effects tweaked for now to just add "./" to those few paths impacted, as well as the perf vars to support the non-hardcoded shader paths in the engine.
This commit is contained in:
parent
5c8a82180b
commit
1ed8b05169
1572 changed files with 146699 additions and 85 deletions
63
Templates/BaseGame/game/data/ui/UI.cs
Normal file
63
Templates/BaseGame/game/data/ui/UI.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
// 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().
|
||||
|
||||
function UI::create( %this )
|
||||
{
|
||||
if ($Server::Dedicated)
|
||||
return;
|
||||
|
||||
// Use our prefs to configure our Canvas/Window
|
||||
configureCanvas();
|
||||
|
||||
//Load UI stuff
|
||||
//we need to load this because some of the menu profiles use the sounds here
|
||||
exec("./scripts/datablocks/guiSounds.cs");
|
||||
|
||||
//Profiles
|
||||
exec("./scripts/profiles.cs");
|
||||
|
||||
//Now gui files
|
||||
exec("./scripts/guis/mainMenu.gui");
|
||||
exec("./scripts/guis/chooseLevelDlg.gui");
|
||||
exec("./scripts/guis/joinServerMenu.gui");
|
||||
exec("./scripts/guis/loadingGui.gui");
|
||||
exec("./scripts/guis/optionsMenu.gui");
|
||||
exec("./scripts/guis/pauseMenu.gui");
|
||||
exec("./scripts/guis/remapDlg.gui");
|
||||
exec("./scripts/guis/remapConfirmDlg.gui");
|
||||
|
||||
exec("./scripts/guis/profiler.gui");
|
||||
exec("./scripts/guis/netGraphGui.gui");
|
||||
|
||||
//Load gui companion scripts
|
||||
exec("./scripts/chooseLevelDlg.cs");
|
||||
exec("./scripts/optionsList.cs");
|
||||
exec("./scripts/optionsMenu.cs");
|
||||
exec("./scripts/graphicsMenu.cs");
|
||||
exec("./scripts/controlsMenu.cs");
|
||||
exec("./scripts/chooseLevelDlg.cs");
|
||||
exec("./scripts/mainMenu.cs");
|
||||
exec("./scripts/joinServerMenu.cs");
|
||||
exec("./scripts/pauseMenu.cs");
|
||||
exec("./scripts/messageBoxes.cs");
|
||||
|
||||
%dbList = new ArrayObject(LevelFilesList);
|
||||
|
||||
Canvas.pushDialog(MainMenuGui);
|
||||
}
|
||||
|
||||
function Game::destroy( %this )
|
||||
{
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue