conforms file names to consistant standard

This commit is contained in:
2026-02-21 04:24:04 +11:00
parent 6b67dd9755
commit 5a4ad8633a
1991 changed files with 3836 additions and 7976 deletions

23
scripts/health.gd Normal file
View File

@@ -0,0 +1,23 @@
class_name Health
extends Node
signal health_depleted
signal health_changed(health: int)
@export var max_health: int = 10
var current_health: int
func take_damage(damage: int) -> void:
current_health -= damage
health_changed.emit(current_health)
if current_health <= 0:
health_depleted.emit()
func heal_damage(healing: int) -> void:
current_health += healing
if current_health > max_health:
current_health = max_health
health_changed.emit(current_health)