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,17 @@
class_name LaunchComponent
extends Node2D
@export var root: Node2D
@export var initial_direction: Vector2 = Vector2.RIGHT
@export var speed: float = 16.0
@export var spawn_position: Vector2 = Vector2.ZERO
@export var spawn_rotation: float = 0.0
func _ready() -> void:
root.global_position = spawn_position
root.global_rotation = spawn_rotation
func get_initial_velocity() -> Vector2:
return initial_direction.normalized() * speed