@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) 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 the_blind.play("瞎子_抽烟") await the_blind.animation_finished the_blind.play("瞎子_咳嗽吐血") await the_blind.animation_finished # 邀请成功 EventManager.set_stage(event_name, 2) SceneManager.unlock_player() func _on_pre_stage_updated(): pass func _on_stage_updated(): pass