move PlayerController to LevelScreen

This commit is contained in:
MihailRis
2024-12-11 23:42:59 +03:00
parent 9adaf6d527
commit 863146cf6b
7 changed files with 66 additions and 64 deletions
+1 -6
View File
@@ -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();
};