Final Commit

This commit is contained in:
Bram Verhulst
2024-06-09 23:32:29 +02:00
parent caabb12838
commit 81746db9ae
36 changed files with 112 additions and 59426 deletions

View File

@@ -39,7 +39,7 @@ void GameManager::DecreaseFuel(float fuel) {
void GameManager::AddFuel(float fuel) {
m_Fuel += fuel;
if(m_Fuel > this->GetMaxFuel()) {
m_Fuel = this->GetMaxFuel();
m_Fuel = (float)this->GetMaxFuel();
}
}
void GameManager::SetHullIntegrity(int hullIntegrity) {
@@ -71,7 +71,7 @@ void GameManager::IncreaseMoney(int money) {
}
void GameManager::Update(float elapsedSecs) {
m_pMainScreen->SetFuelMeterValue(this->GetMaxFuel() - m_Fuel);
m_pMainScreen->SetHullMeterValue(m_HullIntegrity);
m_pMainScreen->SetHullMeterValue((float)m_HullIntegrity);
m_pMainScreen->SetScore(std::to_string(m_Score));
m_pMainScreen->SetMoney("$ " + std::to_string(m_Money));