Files
Azzteroid/shoot.gd
2025-09-03 17:36:59 +02:00

18 lines
312 B
GDScript

extends RigidBody2D
@export var SPEED : float = 100.0
var direction: Vector2:
set(val):
direction = val.normalized() * SPEED
var time := 0.0
func _ready() -> void:
add_to_group("shoot")
func _process(delta: float) -> void:
linear_velocity = direction
time += delta
#if time >= 2:
# self.queue_free()