fix: fix the issue with overriding the timer signal function;

This commit is contained in:
2026-09-20 16:16:13 +02:00
parent fc007ca71a
commit 8a4a440ad9
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -11,13 +11,13 @@ func _ready() -> void:
func _process(delta: float) -> void:
if Input.is_action_just_pressed("Interact") and can_interact:
if !is_open:
$Timer.start()
$AudioStreamPlayer.play()
$AnimatedSprite2D.play("open")
print("found sprite num: ", scroll_number)
scrolls[scroll_number].visible = true
$Timer.start()
is_open = true
func _on_timer_timeout(scroll_number: int) -> void:
func _on_timer_timeout() -> void:
print("removing sprite: ", scroll_number)
scrolls[scroll_number].visible = false
+1 -1
View File
@@ -45,7 +45,7 @@ scrolls = [NodePath("EmptyScroll"), NodePath("IceScroll"), NodePath("FireScroll"
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=990575183]
sprite_frames = SubResource("SpriteFrames_chgu2")
animation = &"open"
animation = &"closed"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=104658718]
position = Vector2(0, 1)