the final rename

This commit is contained in:
MihailRis
2024-05-06 03:38:19 +03:00
parent f27a418dbe
commit 1627e21c1d
196 changed files with 836 additions and 815 deletions
+45
View File
@@ -0,0 +1,45 @@
#ifndef LOGIC_LEVEL_CONTROLLER_HPP_
#define LOGIC_LEVEL_CONTROLLER_HPP_
#include <memory>
#include "../settings.hpp"
#include "PlayerController.hpp"
#include "BlocksController.hpp"
#include "ChunksController.hpp"
class Level;
class Player;
/// @brief LevelController manages other controllers
class LevelController {
EngineSettings& settings;
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);
/// @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 saveWorld();
void onWorldQuit();
Level* getLevel();
Player* getPlayer();
BlocksController* getBlocksController();
PlayerController* getPlayerController();
};
#endif // LOGIC_LEVEL_CONTROLLER_HPP_