Goose now slides out and back properly when called.
This commit is contained in:
parent
69b3b935ad
commit
c5a25cb33a
2 changed files with 9 additions and 4 deletions
|
|
@ -8,9 +8,14 @@ func _ready() -> void:
|
||||||
func _on_goose_talk():
|
func _on_goose_talk():
|
||||||
print("QUACK")
|
print("QUACK")
|
||||||
self.show()
|
self.show()
|
||||||
#var tween = create_tween()
|
var tween = create_tween()
|
||||||
#tween.tween_property(self, "position:x", +5, .5).set_ease(tween.EASE_OUT)
|
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
|
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()
|
self.hide()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,6 @@ region_rect = Rect2(0, 0, 240, 320)
|
||||||
[node name="Goose" parent="." unique_id=1594509381 instance=ExtResource("9_85g3d")]
|
[node name="Goose" parent="." unique_id=1594509381 instance=ExtResource("9_85g3d")]
|
||||||
visible = false
|
visible = false
|
||||||
z_index = 2
|
z_index = 2
|
||||||
position = Vector2(233, 272)
|
position = Vector2(301, 272)
|
||||||
|
|
||||||
[connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]
|
[connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue