hp bar and borders

This commit is contained in:
Tabby 2025-07-20 17:33:13 +10:00
parent 4fa6a88b54
commit 16d7559965
10 changed files with 252 additions and 2 deletions

17
logic.gd Normal file
View file

@ -0,0 +1,17 @@
extends Node2D
var hp : int = 6
@export var hp_bar : AnimatedSprite2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
hp_bar.frame = hp
func _on_lander_got_hit() -> void:
hp -= 1