Add sun / moon, started on score / GameManager

This commit is contained in:
Bram Verhulst
2024-05-16 12:44:53 +02:00
parent 8866f33c09
commit 3c83e566dd
12 changed files with 176 additions and 35 deletions

View File

@@ -18,6 +18,10 @@ MainScreen::MainScreen(TextureManager* manager) : Screen("", Vector2f{0, 0}, Vec
Vector2f DepthMeterPosition{10, ScreenSize.y - 120};
m_DepthText = new GuiText(DepthMeterPosition, "Depth: 20", "fonts/Arial.ttf", 20, Colors::YELLOW);
this->AddElement(m_DepthText);
Vector2f ScoreMeterPosition{10, ScreenSize.y - 150};
m_ScoreText = new GuiText(ScoreMeterPosition, "Score: 0", "fonts/Arial.ttf", 20, Colors::YELLOW);
this->AddElement(m_ScoreText);
}
MainScreen::~MainScreen() = default;
void MainScreen::Draw() const {
@@ -35,4 +39,7 @@ void MainScreen::SetHullMeterValue(float value) const {
void MainScreen::SetDepth(const std::string& text) const {
m_DepthText->ChangeText(text);
}
void MainScreen::SetScore(const std::string& text) const {
m_ScoreText->ChangeText(text);
}