feat: add counter of the scrolls to the player node;

This commit is contained in:
2026-09-20 16:45:59 +02:00
parent 31c34978f2
commit 5d484134e7
2 changed files with 32 additions and 0 deletions
+3
View File
@@ -16,6 +16,7 @@ func _ready() -> void:
func _physics_process(delta: float) -> void:
move_player()
push_blocks()
update_scrolls()
func move_player():
var move_vector: Vector2 = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
@@ -47,6 +48,8 @@ func push_blocks():
move_and_slide()
func update_scrolls():
$CanvasLayer/Panel/Label.text = str(SceneManager.opened_chests.size())
func _on_area_2d_body_entered(body: Node2D) -> void:
if body.is_in_group("interactable"):