TowerDefense/VFX/pixel_drop.gd
Varylios 23e0c03fc0 feat: add autoloader for menu level buttons
fix: wave not restartable when winned
clean: remove useless files + warnings
2025-09-03 03:44:44 +02:00

28 lines
589 B
GDScript

extends CharacterBody2D
class_name RainDrop
@export var speed := 10.0
@export var lifetime := 3.0
@export var trail_lifetime := 1.0
@export var overall_scale := 1.0
func _ready() -> void:
apply_scale_to_all()
$TrailParticles.lifetime = trail_lifetime
$Timer.wait_time = lifetime
$Timer.start()
func _process(_delta: float) -> void:
velocity.y = speed
move_and_slide()
func apply_scale_to_all() -> void:
scale *= overall_scale
$TrailParticles.scale_amount_min = overall_scale
$TrailParticles.scale_amount_max = overall_scale
func _on_timer_timeout() -> void:
queue_free()