mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Merge pull request #1187 from Azaezel/alpah41/callOnChildrenAUG
extended onCreateGame functionality
This commit is contained in:
commit
b66445e85f
1 changed files with 11 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ function loadMissionStage3()
|
||||||
|
|
||||||
// Construct MOD paths
|
// Construct MOD paths
|
||||||
pathOnMissionLoadDone();
|
pathOnMissionLoadDone();
|
||||||
|
getRootScene().callOnChildren("onCreateGame");
|
||||||
// Mission loading done...
|
// Mission loading done...
|
||||||
echo("*** Mission loaded");
|
echo("*** Mission loaded");
|
||||||
|
|
||||||
|
|
@ -152,6 +152,16 @@ function loadMissionStage3()
|
||||||
%hasGameMode = callGamemodeFunction("onMissionStart");
|
%hasGameMode = callGamemodeFunction("onMissionStart");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GameBase::onCreateGame(%this)
|
||||||
|
{
|
||||||
|
%db = %this.getDatablock();
|
||||||
|
if (%db.isMethod("onCreateGame"))
|
||||||
|
{
|
||||||
|
%db.onCreateGame(%this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function endMission()
|
function endMission()
|
||||||
{
|
{
|
||||||
if (!isObject( getScene(0) ))
|
if (!isObject( getScene(0) ))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue