factories and engineers produce and build units by their specific buildable unit tables

This commit is contained in:
devZoGok
2024-03-03 15:47:09 +02:00
parent 7194db47ff
commit 74515d06e1
19 changed files with 150 additions and 71 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ namespace battleship{
using namespace vb01Gui;
using namespace gameBase;
UnitButton::UnitButton(Vector2 pos, Vector2 size, string name, string fontPath, int trigger, string imagePath) : Button(pos, size, name, fontPath, trigger, true, imagePath){
UnitButton::UnitButton(Vector2 pos, Vector2 size, string name, string fontPath, int trigger, string imagePath, int uid) : Button(pos, size, name, fontPath, trigger, true, imagePath), unitId(uid){
StateManager *stateManager = GameManager::getSingleton()->getStateManager();
ActiveGameState *activeState = (ActiveGameState*)stateManager->getAppStateByType((int)AppStateType::ACTIVE_STATE);