feat: defining map region unit un-/registering behaviour

This commit is contained in:
Sara 2025-08-17 17:55:09 +02:00
parent 92c38e54b6
commit d8ae45df0f
7 changed files with 87 additions and 1 deletions

View file

@ -5,6 +5,7 @@
class StateMachine;
class EnemyBody;
class PatrolPath;
class MapRegion;
class NpcUnit : public Node3D {
GDCLASS(NpcUnit, Node3D);
@ -22,12 +23,15 @@ public:
bool is_aware_of_player() const; //!< becomes true when any individual in the unit sees the player.
void set_patrol_speed(float value);
float get_patrol_speed() const;
void set_region(MapRegion *region);
MapRegion *get_region() const;
private:
bool aware_of_player{ false };
Vector<EnemyBody *> npcs{};
PatrolPath *patrol_path{ nullptr };
float patrol_speed{ 1.f };
MapRegion *region{ nullptr };
};
#endif // !NPC_UNIT_H