Add Building, Add Hard floors

This commit is contained in:
Bram Verhulst
2024-04-18 15:39:18 +02:00
parent db83ae5e13
commit ebda39f690
17 changed files with 149 additions and 216 deletions

View File

@@ -46,6 +46,11 @@ WorldLevel::WorldLevel(Camera* camera, Rectf viewport): Level(camera),
for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
m_gridManager.GetTileAtIndex(x, 0)->SetTileType(Tiles::AIR);
}
m_refeulBuilding = new Building { "buildings/fuelStation.png", Vector2f { -700, -50 }, TextureManager::GetInstance() };
m_gridManager.GetTileAtWorldPos(Vector2f{-700, -50})->SetTileType(Tiles::Special::HARD_LEFT);
m_gridManager.GetTileAtWorldPos(Vector2f{-650, -50})->SetTileType(Tiles::Special::HARD_MIDDLE);
m_gridManager.GetTileAtWorldPos(Vector2f{-600, -50})->SetTileType(Tiles::Special::HARD_RIGHT);
}
WorldLevel::~WorldLevel() {
//delete m_pTextTexture;
@@ -132,6 +137,8 @@ void WorldLevel::Draw() const {
if(m_pSelectedTile != nullptr) {
m_pSelectedTile->Draw();
}
m_refeulBuilding->Draw();
m_pCamera->EndRendering();