diff --git a/scenes/goose.gd b/scenes/goose.gd index f1930df..eff2c88 100644 --- a/scenes/goose.gd +++ b/scenes/goose.gd @@ -8,9 +8,14 @@ func _ready() -> void: func _on_goose_talk(): print("QUACK") self.show() - #var tween = create_tween() - #tween.tween_property(self, "position:x", +5, .5).set_ease(tween.EASE_OUT) + var tween = create_tween() + tween.tween_property(self, "position:x", position.x - 50, .5).set_ease(tween.EASE_OUT) + await tween.finished + await get_tree().create_timer(3).timeout - #tween.tween_property(self, "position:x", -5, .5) + + tween = create_tween() + tween.tween_property(self, "position:x", position.x + 50, .5).set_ease(tween.EASE_IN) + await tween.finished self.hide() diff --git a/scenes/main.tscn b/scenes/main.tscn index a1cef78..32ab4d6 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -110,6 +110,6 @@ region_rect = Rect2(0, 0, 240, 320) [node name="Goose" parent="." unique_id=1594509381 instance=ExtResource("9_85g3d")] visible = false z_index = 2 -position = Vector2(233, 272) +position = Vector2(301, 272) [connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]