mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 09:29:44 +00:00
cleanup
This commit is contained in:
parent
7fcf049a72
commit
562a0f9b05
1 changed files with 22 additions and 22 deletions
|
|
@ -15,6 +15,28 @@ class WorldGenerator;
|
|||
|
||||
/// @brief ChunksController manages chunks dynamic loading/unloading
|
||||
class ChunksController {
|
||||
public:
|
||||
std::unique_ptr<Lighting> lighting;
|
||||
|
||||
ChunksController(Level& level);
|
||||
~ChunksController();
|
||||
|
||||
/// @param delta frame time in seconds
|
||||
/// @param loadSpeed chunks loading speed
|
||||
void update(
|
||||
float delta,
|
||||
int loadSpeed,
|
||||
int loadDistance,
|
||||
uint padding,
|
||||
Player& player,
|
||||
bool isLocalPlayer
|
||||
);
|
||||
|
||||
bool isInLoadingZone(const Player& player, uint padding, int x, int z) const;
|
||||
|
||||
const WorldGenerator* getGenerator() const {
|
||||
return generator.get();
|
||||
}
|
||||
private:
|
||||
struct LoadingState {
|
||||
int width = 0;
|
||||
|
|
@ -47,26 +69,4 @@ private:
|
|||
) const;
|
||||
bool buildLights(const Player& player, const std::shared_ptr<Chunk>& chunk) const;
|
||||
void createChunk(const Player& player, int x, int y) const;
|
||||
public:
|
||||
std::unique_ptr<Lighting> lighting;
|
||||
|
||||
ChunksController(Level& level);
|
||||
~ChunksController();
|
||||
|
||||
/// @param delta frame time in seconds
|
||||
/// @param loadSpeed chunks loading speed
|
||||
void update(
|
||||
float delta,
|
||||
int loadSpeed,
|
||||
int loadDistance,
|
||||
uint padding,
|
||||
Player& player,
|
||||
bool isLocalPlayer
|
||||
);
|
||||
|
||||
bool isInLoadingZone(const Player& player, uint padding, int x, int z) const;
|
||||
|
||||
const WorldGenerator* getGenerator() const {
|
||||
return generator.get();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue