xiandie/scene/gallery/clips/clip2.gd

29 lines
832 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends Node2D
# 发送此信号会重载当前 clip重置所有进度自动退出 display 状态)
signal display_finished
# card_mode 卡片模式 / 完整模式
func run_clip(card_mode: bool):
$ProPlayer.play("c00_吕萍_walking_right")
var tween = create_tween()
tween.tween_interval(5.0)
tween.tween_property($"", "modulate:a", 1.0, 5.0)
if not card_mode:
await get_tree().create_timer(3.0).timeout
# 增加配音
dialog_node = DialogueManager.show_dialogue_balloon(dialogue_res, "c02_s11_井边疯子对话")
dialog_node.process_mode = Node.PROCESS_MODE_ALWAYS
await DialogueManager.dialogue_ended
display_finished.emit()
var dialogue_res = preload("res://asset/dialogue/npc.dialogue")
var dialog_node
func _exit_tree() -> void:
if is_instance_valid(dialog_node):
dialog_node.queue_free()