2025-07-27 06:53:36 +00:00
|
|
|
@tool
|
|
|
|
extends Event2D
|
|
|
|
|
|
|
|
# var prev_stage := 0
|
|
|
|
# var stage := 0
|
|
|
|
|
2025-08-11 11:12:55 +00:00
|
|
|
@onready var animated_sprite = $"窗口闪动"
|
2025-07-27 06:53:36 +00:00
|
|
|
|
|
|
|
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:
|
2025-08-11 11:12:55 +00:00
|
|
|
$"Ambush偷听陆仁".triggered.connect(eavesdrop_luren)
|
|
|
|
|
|
|
|
|
|
|
|
func eavesdrop_luren() -> void:
|
|
|
|
# 12 c00_吕萍_蹲下 13 c00_吕萍_蹲下呼吸 14 c00_吕萍_起立
|
|
|
|
SceneManager.lock_player(0, 12)
|
|
|
|
await Util.wait(1)
|
|
|
|
SceneManager.player_action(13)
|
|
|
|
# 对话
|
|
|
|
DialogueManager.show_dialogue_balloon(GlobalConfig.DIALOG_C03, "c03_s01_三楼偷听陆仁小蝶")
|
|
|
|
await DialogueManager.dialogue_ended
|
|
|
|
create_tween().tween_property(animated_sprite, "modulate:a", 0.0, 1.0)
|
|
|
|
await Util.wait(1.5)
|
|
|
|
EventManager.set_stage("c03_invite_xchan_supper", 1)
|
|
|
|
await Util.wait(1.0)
|
|
|
|
SceneManager.player_action(14, true)
|
|
|
|
await SceneManager.pop_os_with_str("c03_s01_偷听完3012")
|
|
|
|
SceneManager.unlock_player()
|
2025-07-27 06:53:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _on_pre_stage_updated() -> void:
|
2025-08-11 11:12:55 +00:00
|
|
|
# 放肉后,渐渐显示
|
|
|
|
if prev_stage == 1:
|
|
|
|
animated_sprite.modulate.a = 0.0
|
|
|
|
create_tween().tween_property(animated_sprite, "modulate:a", 1.0, 1.0)
|
|
|
|
|
2025-07-27 06:53:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _on_stage_updated() -> void:
|
2025-08-11 11:12:55 +00:00
|
|
|
pass
|