mirror of
https://github.com/glest/glest-source.git
synced 2025-10-01 01:46:42 +02:00
- updated to add isGameOver
This commit is contained in:
@@ -315,6 +315,7 @@ void ScriptManager::init(World* world, GameCamera *gameCamera, const XmlNode *ro
|
||||
luaScript.registerFunction(getUnitCount, "unitCount");
|
||||
luaScript.registerFunction(getUnitCountOfType, "unitCountOfType");
|
||||
|
||||
luaScript.registerFunction(getIsGameOver, "isGameOver");
|
||||
luaScript.registerFunction(getGameWon, "gameWon");
|
||||
|
||||
luaScript.registerFunction(getSystemMacroValue, "getSystemMacroValue");
|
||||
@@ -1207,11 +1208,16 @@ int ScriptManager::getWorldFrameCount() {
|
||||
return world->getFrameCount();
|
||||
}
|
||||
|
||||
bool ScriptManager::getGameWon() {
|
||||
bool ScriptManager::getGameWon() const {
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
return gameWon;
|
||||
}
|
||||
|
||||
bool ScriptManager::getIsGameOver() const {
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
return gameOver;
|
||||
}
|
||||
|
||||
int ScriptManager::getLastCreatedUnitId() {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugLUA).enabled) SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
ScriptManager_STREFLOP_Wrapper streflopWrapper;
|
||||
@@ -2076,6 +2082,12 @@ int ScriptManager::getGameWon(LuaHandle* luaHandle){
|
||||
return luaArguments.getReturnCount();
|
||||
}
|
||||
|
||||
int ScriptManager::getIsGameOver(LuaHandle* luaHandle){
|
||||
LuaArguments luaArguments(luaHandle);
|
||||
luaArguments.returnInt(thisScriptManager->getIsGameOver());
|
||||
return luaArguments.getReturnCount();
|
||||
}
|
||||
|
||||
int ScriptManager::loadScenario(LuaHandle* luaHandle) {
|
||||
LuaArguments luaArguments(luaHandle);
|
||||
thisScriptManager->loadScenario(luaArguments.getString(-2),luaArguments.getInt(-1));
|
||||
|
Reference in New Issue
Block a user