Add charge throw mechanics; refactor bullet and brick components

This commit is contained in:
2025-05-12 23:08:54 +02:00
parent b09bee9fb6
commit 59c309409c
34 changed files with 422 additions and 96 deletions

View File

@@ -0,0 +1,22 @@
class_name LifetimeComponent
extends Node
@export var root: Node
@export var life_time: float = 5.0
@export var timer: Timer
func _ready() -> void:
if not root:
printerr("Root node not set.")
return
if not timer:
printerr("Timer node not set.")
return
timer.timeout.connect(on_timer_timeout)
func on_timer_timeout() -> void:
root.queue_free()