Fixed Minimap Updating

This commit is contained in:
jowen005
2026-07-14 18:07:45 -04:00
parent 03781d10d8
commit 81eacdb7e6
9 changed files with 94 additions and 14 deletions
+6 -1
View File
@@ -17,6 +17,7 @@ namespace battleship{
PlayButton::PlayButton(Listbox *ml, Vector3 pos, Vector2 size, string name, bool separate) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", GLFW_KEY_P, separate), mapListbox(ml) {}
// Starts the gameplay
void PlayButton::onClick() {
ConcreteGuiManager *guiManager = ConcreteGuiManager::getSingleton();
vector<Listbox*> factionsListboxes, difficultiesListboxes, colorsListboxes, teamsListboxes;
@@ -30,6 +31,7 @@ namespace battleship{
else if(name == "teams") teamsListboxes.push_back(listbox);
}
// Initialize the game
Game *game = Game::getSingleton();
game->initTechnologies();
@@ -72,7 +74,10 @@ namespace battleship{
string name = (cpuPlayer ? "CPU player #" + to_string(i) : "Player");
game->addPlayer(new Player(difficulty, faction, team, color, cpuPlayer, i, name));
}
// HUD GUI for during gameplay
// The loading app state passed is an InGameAppState for the selected map with the inGame.lua script for the screen
// The initial state of the current map is used to populate the HUD GUI here
handleLoadingGui(new LoadingAppState(new InGameAppState(mapName), "inGame.lua"));
}
}