19 lines
263 B
GDScript
19 lines
263 B
GDScript
extends Area2D
|
|
|
|
var speed = 500
|
|
|
|
func _physics_process(delta):
|
|
global_position.y += speed * delta
|
|
if global_position.y > 1000:
|
|
queue_free()
|
|
|
|
|
|
#this is where i do stuff
|
|
|
|
|
|
|
|
func _on_area_entered(area):
|
|
if area is player:
|
|
area.take_damage(1)
|
|
queue_free()
|