You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
300 B
16 lines
300 B
extends Area2D
|
|
class_name RisingLevel
|
|
|
|
@export var RISING_SPEED = 30
|
|
|
|
func _ready():
|
|
body_entered.connect(_body_entered)
|
|
|
|
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.die()
|
|
|