@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): super._on_global_stage_updated(e, s) var c03_dialogue = preload("uid://b66v5hsf3tdox") as DialogueResource func _on_ground_ready(_ground: Ground2D): # 邀请小蝉晚饭 if stage == 1: SceneManager.lock_player() SceneManager.get_player().set_facing_direction(Vector2.RIGHT) var the_blind = $"瞎子抽烟" as AnimatedSprite2D DialogueManager.show_dialogue_balloon(c03_dialogue, "c03_s02_邀请小蝉与瞎子对话1") the_blind.play("瞎子_抽烟") await the_blind.animation_finished # TODO SceneManager.pop_debug_dialog_info("音效", "灰姑的老鼠叫和影子出现,猫咪害怕的声音响起") the_blind.play("瞎子_咳嗽吐血") await the_blind.animation_finished var tween = create_tween() tween.tween_property(self, "modulate:a", 0.0, 1.0) await tween.finished # 邀请成功 EventManager.set_stage(event_name, 2) SceneManager.unlock_player() func _on_pre_stage_updated(): pass func _on_stage_updated(): pass