Files
SWGalaga/Scripts/y_wing_main_cannon_laser.gd

17 lines
235 B
GDScript3
Raw Permalink Normal View History

extends Area2D
var speed = 2500
func _physics_process(delta):
global_position.y += speed * delta
if global_position.y >= 980:
queue_free()
func _on_area_entered(area):
if area is player:
area.take_damage(1)
queue_free()