12 lines
208 B
GDScript3
12 lines
208 B
GDScript3
|
extends Sprite2D
|
||
|
|
||
|
@export var lifetime: float = 120
|
||
|
|
||
|
func _ready() -> void:
|
||
|
rotation_degrees = randf_range(0, 360)
|
||
|
|
||
|
func _process(delta: float) -> void:
|
||
|
lifetime -= delta
|
||
|
if lifetime <= 0:
|
||
|
queue_free()
|