refactored cell world building

#8 included resources into cell data
This commit is contained in:
2024-02-06 07:38:23 -06:00
parent d8184ab48b
commit 7c81a2229e
10 changed files with 164 additions and 38 deletions

16
scripts/cell_data.gd Normal file
View File

@@ -0,0 +1,16 @@
class_name CellData
extends Node
@export var layer_info: Dictionary = {
Constants.TilemapLayers.CORRUPTION: false
}
var _pos: Vector2i
func _init(pos: Vector2i) -> void:
_pos = pos
func change_layer(layer: int, data: Variant) -> void:
layer_info[layer] = data
func is_corrupted() -> bool:
return layer_info[Constants.TilemapLayers.CORRUPTION]