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,18 @@
class_name BulletComponent
extends Node
@export var root: Node2D
@export var area2d: Area2D
func _ready() -> void:
area2d.body_entered.connect(on_area2d_body_entered)
area2d.area_entered.connect(on_area2d_area_entered)
func on_area2d_body_entered(_body: Node2D) -> void:
root.queue_free()
func on_area2d_area_entered(_area: Area2D) -> void:
root.queue_free()