feat: refactored how mapregion tracks units and npcs

This commit is contained in:
Sara 2025-08-28 19:12:57 +02:00
parent 0ff5f4ae9c
commit 8dad8bbc1f
2 changed files with 30 additions and 5 deletions

View file

@ -8,7 +8,10 @@
class MapRegion : public Area3D {
GDCLASS(MapRegion, Area3D);
static void _bind_methods();
void on_node_entered(Node *node);
void on_node_entered(Node3D *node);
void on_node_exited(Node3D *node);
void on_child_entered_tree(Node *node);
void enter_tree();
void ready();
protected:
@ -24,6 +27,7 @@ private:
double difficulty{ 0.f };
bool hunt_phase{ false };
HashSet<NpcUnit *> units{ nullptr };
bool has_player{ false };
public:
static String const sig_difficulty_increased;