mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
One step closer to multiplayer
This commit is contained in:
parent
e0daa4d1b9
commit
91a4b16796
26 changed files with 213 additions and 219 deletions
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue