xiandie/scene/ground/script/c04/s08_event陆蝶演出.gd

67 lines
1.8 KiB
GDScript3
Raw Normal View History

2025-08-26 05:37:13 +00:00
@tool
extends Event2D
# var prev_stage := 0
# var stage := 0
func _ready() -> void:
super._ready()
if Engine.is_editor_hint():
return
func _on_global_stage_updated(e: StringName, s: int) -> void:
super._on_global_stage_updated(e, s)
func _on_ground_ready(_ground: Ground2D) -> void:
$"Ambush陆蝶演出".triggered.connect(_start_show, CONNECT_ONE_SHOT)
func _on_pre_stage_updated() -> void:
pass
func _on_stage_updated() -> void:
pass
2025-08-26 12:57:41 +00:00
@onready var animation_player = $"AnimationPlayer" as AnimationPlayer
@onready var light = $"PointLight2D" as PointLight2D
@onready var luren = $"Pro陆蝶" as ProAnimatedSprite2D
@onready var xxxdie = $"小小小蝶" as ProAnimatedSprite2D
2025-08-26 05:37:13 +00:00
func _start_show() -> void:
SceneManager.lock_player()
await SceneManager.pop_os_with_str("c04_鬼打墙_开始os")
2025-08-26 12:57:41 +00:00
light.show()
var energy = light.energy
light.energy = 0.0
luren.show()
luren.modulate.a = 0.0
var tween = create_tween()
tween.tween_property(luren, "modulate:a", 1.0, 1.0)
tween.parallel().tween_property(light, "energy", energy, 1.0)
await tween.finished
luren.play("小小小蝶骑在陆仁脖子上擦墙上的涂鸦")
# DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C04, "")
# await DialogueManager.dialogue_ended
await Util.wait(3.0)
luren.play("陆仁坐下")
await luren.animation_finished
xxxdie.show()
luren.play("陆仁艰难站起")
await luren.animation_finished
luren.play("陆仁行走回头")
await luren.animation_changed
tween = create_tween()
tween.tween_interval(0.5)
tween.tween_property(luren, "modulate:a", 0.0, 1.5)
tween.parallel().tween_property(xxxdie, "modulate:a", 0.0, 1.0)
await tween.finished
SceneManager.unlock_player()
func speak_dialogue():
SceneManager.pop_debug_dialog_info("对白", "小蝶: 爸爸...")