Files
SWGalaga/Scenes/PlayerLaser.gd

12 lines
201 B
GDScript3
Raw Permalink Normal View History

2024-06-03 05:29:11 -04:00
extends Area2D
var speed = 1000
func _physics_process(delta):
global_position.y += -speed * delta
func _on_area_entered(area):
if area.is_in_group("enemies"):
area.take_damage(1)
queue_free()