minor controllers refactor

This commit is contained in:
MihailRis
2024-11-20 18:03:39 +03:00
parent 9e02f1122f
commit 005bcfb436
5 changed files with 56 additions and 58 deletions
+4 -4
View File
@@ -13,9 +13,9 @@ class WorldGenerator;
/// @brief ChunksController manages chunks dynamic loading/unloading
class ChunksController {
private:
Level* level;
Chunks* chunks;
Lighting* lighting;
Level& level;
Chunks& chunks;
Lighting& lighting;
uint padding;
std::unique_ptr<WorldGenerator> generator;
@@ -24,7 +24,7 @@ private:
bool buildLights(const std::shared_ptr<Chunk>& chunk);
void createChunk(int x, int y);
public:
ChunksController(Level* level, uint padding);
ChunksController(Level& level, uint padding);
~ChunksController();
/// @param maxDuration milliseconds reserved for chunks loading