mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
code clean up
This commit is contained in:
@@ -10,14 +10,6 @@ function executeBtNode(agent, btNode)
|
||||
func = btNode.children[i].func
|
||||
args = btNode.children[i].args
|
||||
res = agent[func](agent, args)
|
||||
|
||||
a1 = args and args.tfId or nil
|
||||
a1 = a1 and a1 or ''
|
||||
|
||||
a2 = args and args.spId or nil
|
||||
a2 = a2 and a2 or ''
|
||||
|
||||
print('executing: ' .. func .. ', args: tf: ' .. a1 .. ', sp: ' .. a2 .. ', res: ' .. res)
|
||||
else
|
||||
res = executeBtNode(agent, btNode.children[i])
|
||||
end
|
||||
|
||||
@@ -33,15 +33,13 @@ namespace battleship{
|
||||
return game;
|
||||
}
|
||||
|
||||
void Game::resetLuaGameObjects(){}
|
||||
|
||||
void Game::endGame(bool victory){
|
||||
ended = true;
|
||||
|
||||
StateManager *sm = GameManager::getSingleton()->getStateManager();
|
||||
sm->dettachAppState(sm->getAppStateByType(AppStateType::ACTIVE_STATE));
|
||||
|
||||
togglePause();
|
||||
togglePause();
|
||||
|
||||
string endGameScreen = (victory ? "victory.lua" : "defeat.lua");
|
||||
ConcreteGuiManager::getSingleton()->readLuaScreenScript(endGameScreen);
|
||||
|
||||
Reference in New Issue
Block a user