feat: Implement core game mechanics including player, enemies, bullets, HUD, and level setup.
This commit is contained in:
13
scripts/level_0.gd
Normal file
13
scripts/level_0.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends Node2D
|
||||
|
||||
@onready var player = $player
|
||||
@onready var hud = $HUD
|
||||
|
||||
func _ready():
|
||||
if player:
|
||||
player.health_changed.connect(hud.update_health)
|
||||
player.died.connect(hud.show_game_over)
|
||||
|
||||
var turret = player.get_node("turret")
|
||||
if turret:
|
||||
turret.ammo_changed.connect(hud.update_ammo)
|
||||
Reference in New Issue
Block a user