Add fly animations
This commit is contained in:
@@ -13,16 +13,19 @@ void GameManager::SetMainScreen(MainScreen* pMainScreen) {
|
||||
m_pMainScreen = pMainScreen;
|
||||
//TODO: not the best but ¯\_(ツ)_/¯
|
||||
}
|
||||
void GameManager::SetFuel(int fuel) {
|
||||
void GameManager::SetFuel(float fuel) {
|
||||
m_Fuel = fuel;
|
||||
//Limit to 0 - MAXa
|
||||
|
||||
}
|
||||
int GameManager::GetFuel() const {
|
||||
float GameManager::GetFuel() const {
|
||||
return m_Fuel;
|
||||
}
|
||||
void GameManager::DecreaseFuel(int fuel) {
|
||||
void GameManager::DecreaseFuel(float fuel) {
|
||||
m_Fuel -= fuel;
|
||||
m_Fuel = std::max(0.0f, m_Fuel);
|
||||
}
|
||||
void GameManager::AddFuel(int fuel) {
|
||||
void GameManager::AddFuel(float fuel) {
|
||||
m_Fuel += fuel;
|
||||
}
|
||||
void GameManager::SetHullIntegrity(int hullIntegrity) {
|
||||
@@ -43,8 +46,20 @@ int GameManager::GetScore() const {
|
||||
void GameManager::IncreaseScore(int score) {
|
||||
m_Score += score;
|
||||
}
|
||||
void GameManager::SetMoney(int money) {
|
||||
m_Money = money;
|
||||
}
|
||||
int GameManager::GetMoney() const {
|
||||
return m_Money;
|
||||
}
|
||||
void GameManager::IncreaseMoney(int money) {
|
||||
m_Money += money;
|
||||
}
|
||||
void GameManager::Update(float elapsedSecs) {
|
||||
m_pMainScreen->SetFuelMeterValue(m_Fuel);
|
||||
m_pMainScreen->SetFuelMeterValue(this->GetMaxFuel() - m_Fuel);
|
||||
m_pMainScreen->SetHullMeterValue(m_HullIntegrity);
|
||||
m_pMainScreen->SetScore(std::to_string(m_Score));
|
||||
}
|
||||
int GameManager::GetMaxFuel() {
|
||||
return 100; //TODO: change if i ever add upgrades
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user