feat: Implement core game mechanics including player, enemies, bullets, HUD, and level setup.

This commit is contained in:
2025-11-21 13:18:53 +01:00
commit 245e3e141d
39 changed files with 823 additions and 0 deletions

14
scripts/ammo_pickup.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Area2D
@export_enum("AP", "HE") var ammo_type: int = 0
@export var amount: int = 10
func _ready():
body_entered.connect(_on_body_entered)
func _on_body_entered(body):
if body.is_in_group("player"):
var turret = body.get_node_or_null("turret")
if turret and turret.has_method("add_ammo"):
turret.add_ammo(ammo_type, amount)
queue_free()