ft: wrapping manager overhaul

This commit is contained in:
2026-03-01 14:11:28 +01:00
parent 99de1fc113
commit f83b290f5c
24 changed files with 221 additions and 182 deletions

View File

@@ -0,0 +1,32 @@
extends Node
class_name NPC
@export var maxHealth: int = 0
var health: int = maxHealth
signal died
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
spawn()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func spawn() -> void:
pass
func take_damage(dmg: int) -> void:
self.health -= dmg;
if self.health < 0:
self.die()
func die() -> void:
died.emit()
queue_free()
# TODO: should associate this class with a loot table (or equivalent), and can then implement logic for dying in parent class here.
func move(destination: Vector3) -> void:
push_error("Function move() not implemented.")