mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-18 11:39:20 +01:00
Add Text rendering and Hull / Fuel Meters
This commit is contained in:
@@ -6,8 +6,8 @@ Building::Building(const std::string& filePath, const Vector2f& position, Textur
|
||||
m_Texture = pTextureManager->GetTexture(filePath);
|
||||
m_Size = Vector2f(m_Texture->GetWidth(), m_Texture->GetHeight());
|
||||
}
|
||||
Building::~Building() {
|
||||
}
|
||||
Building::~Building() = default;
|
||||
|
||||
void Building::Draw() const {
|
||||
m_Texture->Draw(m_Position);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "Collision.h"
|
||||
#include "colors.h"
|
||||
#include "GroundTileTypeManager.h"
|
||||
#include "../../GridSystem/GroundTileTypeManager.h"
|
||||
#include "utils.h"
|
||||
#include "GridSystem/WorldTile.h"
|
||||
#include "Gui/Screens/ScreenManager.h"
|
||||
@@ -66,6 +66,7 @@ WorldLevel::WorldLevel(Camera* camera, Rectf viewport): Level(camera),
|
||||
m_topCover = TextureManager::GetInstance()->GetTexture("topBackground.png");
|
||||
|
||||
m_MainScreen = new MainScreen(TextureManager::GetInstance());
|
||||
|
||||
|
||||
}
|
||||
WorldLevel::~WorldLevel() {
|
||||
@@ -79,6 +80,7 @@ void WorldLevel::Update(float elapsedSec) {
|
||||
m_MousePos = Vector2f { float(mouseX), float(mouseY) };
|
||||
m_MousePos = m_pCamera->TransformMouse(m_MousePos);
|
||||
|
||||
|
||||
// for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
||||
// for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
||||
// m_gridManager.GetTileAtIndex(x, y)->m_Hightlight = false;
|
||||
@@ -133,6 +135,7 @@ void WorldLevel::Update(float elapsedSec) {
|
||||
}
|
||||
|
||||
m_MainScreen->Update(elapsedSec);
|
||||
m_MainScreen->SetDepth(std::to_string((int)-m_Player.GetPosition().y - 50) + " ft.");
|
||||
|
||||
//Vector2f playerPos = m_player.GetPosition();
|
||||
//Vector2f newCameraPos = playerPos;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "GridSystem/WorldGridManager.h"
|
||||
#include "Gui/Screens/ScreenManager.h"
|
||||
#include "Camera.h"
|
||||
#include "Text.h"
|
||||
#include "Gui/GuiMeter.h"
|
||||
#include "Gui/Screens/MainScreen.h"
|
||||
#include "Particle/Particle.h"
|
||||
@@ -47,7 +48,7 @@ private:
|
||||
|
||||
|
||||
MainScreen* m_MainScreen{};
|
||||
|
||||
|
||||
Texture* m_topCover{ nullptr };
|
||||
|
||||
// ImGui Vars
|
||||
|
||||
Reference in New Issue
Block a user