factored out GameObjectFrame

refactored GameObject/Unit- Factory class
This commit is contained in:
devZoGok
2023-10-07 12:43:08 +03:00
parent 1f82b1dfd9
commit cf9ac6199e
15 changed files with 104 additions and 80 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
#include "addUnitCommand.h"
#include "inGameAppState.h"
#include "player.h"
#include "unitFactory.h"
#include "gameObjectFactory.h"
namespace battleship{
using namespace gameBase;
@@ -48,7 +48,7 @@ namespace battleship{
void AddUnitCommand::addUnit(){
Player* player = Map::getSingleton()->getPlayer(playerId);
player->addUnit(UnitFactory::createUnit(player, unitId, pos, rot));
player->addUnit(GameObjectFactory::createUnit(player, unitId, pos, rot));
}
void AddUnitCommand::execute(){