extends Area2D class_name RisingLevel @export var RISING_SPEED = 30 func _ready(): body_entered.connect(_body_entered) body_exited.connect(_body_exited) func _physics_process(delta): $shape.position.y -= RISING_SPEED * delta self.position = self.position func _body_entered(body): if body.is_in_group("player"): body.swim() if body.is_in_group("npc"): body.die(RISING_SPEED) func _body_exited(body): if body.is_in_group("player"): body.unswim()