This commit is contained in:
Bram Verhulst
2024-06-09 22:03:29 +02:00
parent d7389411f5
commit 5f1dcd5788
76 changed files with 1532 additions and 385 deletions

View File

@@ -1,14 +1,17 @@
#pragma once
#include "Player.h"
#include "Gui/Screens/MainScreen.h"
#include "Inventory/PlayerInventory.h"
class GameManager {
public:
static GameManager& GetInstance();
static GameManager* m_pInstance;
static void DestroyInstance();
void SetMainScreen(MainScreen* pMainScreen);
void SetPlayer(Player* pPlayer); //No time
void SetFuel(float fuel);
float GetFuel() const;
@@ -29,9 +32,11 @@ public:
void Update(float elapsedSecs);
int GetMaxFuel();
PlayerInventory* GetInventory();
Player* GetPlayer();
private:
GameManager() = default;
GameManager();
float m_Balance{ 0.0f };
@@ -40,5 +45,11 @@ private:
int m_Score{ 0 };
int m_Money{ 0 };
MainScreen* m_pMainScreen{ nullptr };
PlayerInventory* m_pInventory{ nullptr };
Player* m_pPlayer{ nullptr };
SoundEffect* m_FuelLowSound{ nullptr };
};