goose_talk function now passes index_frame attribute to set which phrase
will display from the spritesheet.
This commit is contained in:
parent
e3c384c3cd
commit
462b0fc4b0
7 changed files with 16 additions and 13 deletions
|
|
@ -5,18 +5,18 @@ func _ready() -> void:
|
|||
EventBus.goose_talk.connect(_on_goose_talk)
|
||||
|
||||
|
||||
func _on_goose_talk():
|
||||
func _on_goose_talk(frame_index: int):
|
||||
print("QUACK")
|
||||
self.show()
|
||||
self.show()
|
||||
$DapperGoose/Bubble.set_frame(frame_index)
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "position:x", position.x - 50, .5).set_ease(tween.EASE_OUT)
|
||||
await tween.finished
|
||||
$DapperGoose/Bubble.show()
|
||||
await get_tree().create_timer(3).timeout
|
||||
$DapperGoose/Bubble.hide()
|
||||
|
||||
|
||||
tween = create_tween()
|
||||
tween.tween_property(self, "position:x", position.x + 50, .5).set_ease(tween.EASE_IN)
|
||||
await tween.finished
|
||||
self.hide()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue