Files
romants/entities/buildings/building.gd
2024-10-07 02:28:14 +02:00

10 lines
185 B
GDScript

class_name Building extends StaticBody3D
@export var max_health := 10
@onready var health := max_health
func hit(damage:int) -> void:
health -= damage
if health < 0:
queue_free()