Loads of stuff
This commit is contained in:
parent
f3af522683
commit
66ce3ff503
413 changed files with 14802 additions and 0 deletions
26
Entities/GroundTile/ground_tile.gd
Normal file
26
Entities/GroundTile/ground_tile.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
extends Node3D
|
||||
|
||||
@onready var debug_text: Label = $DebugText/DebugTextLabel
|
||||
|
||||
var grid_x: int
|
||||
var grid_z: int
|
||||
var cell_info: CellDataResource
|
||||
|
||||
func _ready() -> void:
|
||||
if cell_info != null:
|
||||
update_text_label()
|
||||
|
||||
func set_grid_location(x, z) -> void:
|
||||
grid_x = x
|
||||
grid_z = z
|
||||
cell_info = MapData.get_map_data(grid_x, grid_z)
|
||||
|
||||
var debug_dict = {}
|
||||
if cell_info.get_script():
|
||||
var script_properties = cell_info.get_script().get_script_property_list()
|
||||
for prop in script_properties:
|
||||
debug_dict[prop.name] = cell_info.get(prop.name)
|
||||
Log.pr(debug_dict)
|
||||
|
||||
func update_text_label() -> void:
|
||||
debug_text.text = str(grid_x) + ', ' + str(grid_z) + ', ' + str(cell_info.cell_seed)
|
||||
Loading…
Add table
Add a link
Reference in a new issue