wave-survival/modules/wave_survival/map_region.h

31 lines
583 B
C++

#ifndef MAP_REGION_H
#define MAP_REGION_H
#include "core/templates/hash_set.h"
#include "npc_unit.h"
#include "scene/3d/physics/area_3d.h"
class MapRegion : public Area3D {
GDCLASS(MapRegion, Area3D);
static void _bind_methods();
void on_node_entered(Node *node);
void ready();
protected:
void _notification(int what);
public:
void register_unit(NpcUnit *unit);
void remove_unit(NpcUnit *unit);
private:
float awareness{ 0.f };
bool hunt_phase{ false };
HashSet<NpcUnit *> units{ nullptr };
public:
static String const sig_phase_changed;
};
#endif // !MAP_REGION_H