One step closer to multiplayer

This commit is contained in:
InfiniteCoder 2024-03-02 22:59:31 +03:00 • committed by MihailRis
parent e0daa4d1b9
commit 91a4b16796
26 changed files with 213 additions and 219 deletions

View file

@ -4,22 +4,23 @@
#include <memory>
#include "../settings.h"
#include "PlayerController.h"
#include "BlocksController.h"
#include "ChunksController.h"
class Level;
class BlocksController;
class ChunksController;
class PlayerController;
class Player;
/* LevelController manages other controllers */
class LevelController {
EngineSettings& settings;
Level* level;
std::unique_ptr<Level> level;
// Sub-controllers
std::unique_ptr<BlocksController> blocks;
std::unique_ptr<ChunksController> chunks;
std::unique_ptr<PlayerController> player;
public:
LevelController(EngineSettings& settings, Level* level);
~LevelController();
/*
@param delta time elapsed since the last update
@ -32,6 +33,9 @@ public:
void onWorldSave();
void onWorldQuit();
Level* getLevel();
Player* getPlayer();
};
#endif // LOGIC_LEVEL_CONTROLLER_H_