feat: add counter of the scrolls to the player node;
This commit is contained in:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user