diff --git a/scripts/objects/gift_box.gd b/scripts/objects/gift_box.gd index 98cbdf8..2510e23 100644 --- a/scripts/objects/gift_box.gd +++ b/scripts/objects/gift_box.gd @@ -63,13 +63,13 @@ func _on_lid_opened() -> void: func _start_close_lid() -> void: var lid: Node2D = get_node_or_null("Lid") as Node2D var gift: Node2D = get_node_or_null("Gift") as Node2D - var tween: Tween = create_tween().set_parallel(true) + var tween: Tween = create_tween() if lid != null: - tween.tween_property(lid, "position:y", CLOSED_LID_Y, OPEN_DURATION) - tween.tween_property(lid, "modulate:a", 1.0, OPEN_DURATION) + tween.parallel().tween_property(lid, "position:y", CLOSED_LID_Y, OPEN_DURATION) + tween.parallel().tween_property(lid, "modulate:a", 1.0, OPEN_DURATION) if gift != null: - tween.tween_property(gift, "modulate:a", 0.0, OPEN_DURATION) - tween.finished.connect(_on_reset_complete) + tween.parallel().tween_property(gift, "modulate:a", 0.0, OPEN_DURATION) + tween.tween_callback(_on_reset_complete) func _on_reset_complete() -> void: