chore: adjusting terrain logic
This commit is contained in:
parent
a10e6d8ad4
commit
ed1d045ab1
4 changed files with 41 additions and 32 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "core/templates/vector.h"
|
||||
#include "macros.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/timer.h"
|
||||
class TerrainChunkMesh;
|
||||
class TerrainModifier;
|
||||
|
||||
|
|
@ -11,8 +12,6 @@ class Terrain : public Node {
|
|||
static void _bind_methods();
|
||||
void ready();
|
||||
void update_modifier_list();
|
||||
void construct_chunk_grid();
|
||||
void generate_meshes();
|
||||
|
||||
void child_entered(Node *node);
|
||||
void child_exiting(Node *node);
|
||||
|
|
@ -21,11 +20,14 @@ protected:
|
|||
void _notification(int what);
|
||||
|
||||
public:
|
||||
void construct_chunk_grid();
|
||||
void generate_meshes();
|
||||
float height_at(Vector2 world_coordinate);
|
||||
|
||||
private:
|
||||
Timer *timer{ nullptr };
|
||||
size_t side_length{ 100 };
|
||||
size_t chunk_size{ 10 };
|
||||
size_t chunk_size{ 50 };
|
||||
size_t detail{ 1 };
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue