28 lines
886 B
GDScript
28 lines
886 B
GDScript
extends Node2D
|
|
|
|
var dialogue_c01 := preload("res://asset/dialogue/c01.dialogue") as DialogueResource
|
|
|
|
func play():
|
|
var tween = create_tween()
|
|
tween.tween_property(self, "modulate:a", 1.0, 0.5)
|
|
$Sfx.play()
|
|
var animation_player = $AnimationPlayer as AnimationPlayer
|
|
animation_player.play("鬼差探头")
|
|
animation_player.animation_finished.connect(_on_animation_finished)
|
|
|
|
func play_bgm():
|
|
# 音效
|
|
var stream = $"背景音".stream
|
|
AudioManager.loop_bgm_music("黄包车背景音效", stream)
|
|
|
|
func _on_animation_finished(_name):
|
|
# debug 模式允许跳过
|
|
if GlobalConfig.DEBUG:
|
|
DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s11_车夫对话1")
|
|
else:
|
|
DialogueManager.show_dialogue_balloon(
|
|
dialogue_c01, "c01_s11_车夫对话1", [GlobalConfig.DIALOG_IGNORE_INPUT]
|
|
)
|
|
# 跳转场景
|
|
SceneManager.get_ground_loader().transition_to_scene("c01_s11", "left")
|