#ifndef NPC_UNIT_H #define NPC_UNIT_H #include "scene/main/node.h" class StateMachine; class EnemyBody; class PatrolPath; class NpcUnit : public Node { GDCLASS(NpcUnit, Node); static void _bind_methods(); void child_added(Node *node); void enter_tree(); protected: void _notification(int what); public: void set_patrol_path(PatrolPath *path); PatrolPath *get_patrol_path() const; 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; private: Vector npcs{}; PatrolPath *patrol_path{ nullptr }; float patrol_speed{ 3.f }; }; #endif // !NPC_UNIT_H