mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 10:29:47 +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
|
/// @brief ChunksController manages chunks dynamic loading/unloading
|
||||||
class ChunksController {
|
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:
|
private:
|
||||||
struct LoadingState {
|
struct LoadingState {
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
|
@ -47,26 +69,4 @@ private:
|
||||||
) const;
|
) const;
|
||||||
bool buildLights(const Player& player, const std::shared_ptr<Chunk>& chunk) const;
|
bool buildLights(const Player& player, const std::shared_ptr<Chunk>& chunk) const;
|
||||||
void createChunk(const Player& player, int x, int y) 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