add tilemap layers to room

This commit is contained in:
yuki 2025-11-24 07:53:14 -03:00
parent b55eb64385
commit 9950ae3907
2 changed files with 8 additions and 0 deletions

View file

@ -5,6 +5,8 @@ class_name Room extends Node2D
@onready var camera: RoomCamera = $RoomCamera
@onready var director: StateMachine = $RoomDirector
@onready var wall_layer: TileMapLayer = $WallTileMapLayer
@onready var floor_layer: TileMapLayer = $WallTileMapLayer/FloorTileMapLayer
# TODO: better alternative to preloading as i add functionality?
# https://theduriel.github.io/Godot/Do-not-use---Preload

View file

@ -37,3 +37,9 @@ metadata/_custom_type_script = "uid://hjm43hb4os07"
[node name="RoomCamera" type="Camera2D" parent="."]
editor_draw_screen = false
script = ExtResource("3_y1kpu")
[node name="WallTileMapLayer" type="TileMapLayer" parent="."]
y_sort_enabled = true
[node name="FloorTileMapLayer" type="TileMapLayer" parent="WallTileMapLayer"]
z_index = -1