mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
move PlayerController to LevelScreen
This commit is contained in:
parent
9adaf6d527
commit
863146cf6b
7 changed files with 66 additions and 64 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "BlocksController.hpp"
|
||||
#include "ChunksController.hpp"
|
||||
#include "PlayerController.hpp"
|
||||
|
||||
class Engine;
|
||||
class Level;
|
||||
|
|
@ -18,23 +17,19 @@ class LevelController {
|
|||
// Sub-controllers
|
||||
std::unique_ptr<BlocksController> blocks;
|
||||
std::unique_ptr<ChunksController> chunks;
|
||||
std::unique_ptr<PlayerController> player;
|
||||
public:
|
||||
LevelController(Engine* engine, std::unique_ptr<Level> level);
|
||||
|
||||
/// @param delta time elapsed since the last update
|
||||
/// @param input is user input allowed to be handled
|
||||
/// @param pause is world and player simulation paused
|
||||
void update(float delta, bool input, bool pause);
|
||||
void update(float delta, bool pause);
|
||||
|
||||
void saveWorld();
|
||||
|
||||
void onWorldQuit();
|
||||
|
||||
Level* getLevel();
|
||||
Player* getPlayer();
|
||||
|
||||
BlocksController* getBlocksController();
|
||||
ChunksController* getChunksController();
|
||||
PlayerController* getPlayerController();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue