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