ft: wrapping manager overhaul

This commit is contained in:
djaidjai committed 2026-03-01 14:11:48 +01:00
1 parent 99de1fc113
commit f83b290f5c
24 files changed
+221 -182

No files matched your search

@@ -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.")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.