-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cs
58 lines (42 loc) · 1.5 KB
/
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//---------------------------------------------------------------------------------------------
// Torque Game Builder
// Copyright (C) GarageGames.com, Inc.
//---------------------------------------------------------------------------------------------
/// Player Initialization Procedure
///
function onStart()
{
}
function onExit()
{
}
//---------------------------------------------------------------------------------------------
// Load the paths we need access to
//---------------------------------------------------------------------------------------------
function loadPath( %path )
{
setModPaths( getModPaths() @ ";" @ %path );
exec(%path @ "/main.cs");
}
//---------------------------------------------
// Do some bootstrap voodoo to get the game to
// the initializeProject phase of loading and
// pass off to the user
//---------------------------------------------
// Output a console log
setLogMode(6);
loadPath( "common" );
loadPath( "game" );
onStart();
// Initialized
echo("\nTorque Game Builder (" @ getT2DVersion() @ ") initialized...");
if( !isFunction( "initializeProject" ) || !isFunction( "_initializeProject" ) )
{
messageBox( "Game Startup Error", "'initializeProject' function could not be found." @
"\nThis could indicate a bad or corrupt common directory for your game." @
"\n\nThe Game will now shutdown because it cannot properly function", "Ok", "MIStop" );
quit();
}
_initializeProject();
// Startup the project
initializeProject();