fix: fix the issue with overriding the timer signal function;
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user