Address review feedback: Implement chunk streaming system in GDScript #20
@@ -11,9 +11,9 @@ extends Node3D
|
|||||||
##
|
##
|
||||||
## ```
|
## ```
|
||||||
## ChunkScene (Node3D)
|
## ChunkScene (Node3D)
|
||||||
## ├─ TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...)
|
## ├── TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...)
|
||||||
## ├─ StaticObject (Node3D) # props, geometry, interactables
|
## ├── StaticObject (Node3D) # props, geometry, interactables
|
||||||
## └─ DynamicObject (Node3D) # spawnable entities (templates)
|
## └── DynamicObject (Node3D) # spawnable entities (templates)
|
||||||
## ```
|
## ```
|
||||||
##
|
##
|
||||||
## ## Lifecycle
|
## ## Lifecycle
|
||||||
@@ -164,7 +164,7 @@ func contains_position(pos: Vector3) -> bool:
|
|||||||
|
|
||||||
## Check if a chunk coordinate is adjacent to this chunk.
|
## Check if a chunk coordinate is adjacent to this chunk.
|
||||||
func is_adjacent(other_coord: Vector3i) -> bool:
|
func is_adjacent(other_coord: Vector3i) -> bool:
|
||||||
var dx := abs(coord.x - other_coord.x)
|
var dx: int = abs(coord.x - other_coord.x)
|
||||||
var dy := abs(coord.y - other_coord.y)
|
var dy: int = abs(coord.y - other_coord.y)
|
||||||
var dz := abs(coord.z - other_coord.z)
|
var dz: int = abs(coord.z - other_coord.z)
|
||||||
return dx <= 1 and dy <= 1 and dz <= 1 and (dx + dy + dz) > 0
|
return dx <= 1 and dy <= 1 and dz <= 1 and (dx + dy + dz) > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user