mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 20:54:46 +00:00
Standardizes Gamemodes to be an actual class with data and utility functions that can be parsed Adds inspector field handling for selecting gamemodes Updated Scene class to work with Gamemodes for the gamemode field Updates editor suite elements to be able to create SubScenes, SceneGroups and Gamemodes Adds ability to convert SimGroup to SubScene Updates BaseUI's chooselevel menu to have gamemode selection and filters shown levels based on selected gamemode
50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
function ExampleModule::onCreate(%this)
|
|
{
|
|
}
|
|
|
|
function ExampleModule::onDestroy(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when the server is initially set up by the game application
|
|
function ExampleModule::initServer(%this)
|
|
{
|
|
%this.queueExec("./scripts/server/ExampleGameMode");
|
|
}
|
|
|
|
//This is called when the server is created for an actual game/map to be played
|
|
function ExampleModule::onCreateGameServer(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when the server is shut down due to the game/map being exited
|
|
function ExampleModule::onDestroyGameServer(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when the client is initially set up by the game application
|
|
function ExampleModule::initClient(%this)
|
|
{
|
|
%this.queueExec("./scripts/client/inputCommands");
|
|
|
|
//client scripts
|
|
exec("./scripts/client/defaultkeybinds");
|
|
|
|
%prefPath = getPrefpath();
|
|
if(isScriptFile(%prefPath @ "/keybinds"))
|
|
exec(%prefPath @ "/keybinds");
|
|
|
|
%this.queueExec("./scripts/server/ExampleGameMode");
|
|
}
|
|
|
|
//This is called when a client connects to a server
|
|
function ExampleModule::onCreateClientConnection(%this)
|
|
{
|
|
ExampleMovemap.push();
|
|
}
|
|
|
|
//This is called when a client disconnects from a server
|
|
function ExampleModule::onDestroyClientConnection(%this)
|
|
{
|
|
}
|