feat: NPC units drop demo packs
This commit is contained in:
parent
dd6a639eb1
commit
6b7ca195ee
3 changed files with 32 additions and 12 deletions
|
|
@ -11,7 +11,7 @@ class NpcUnit : public Node3D {
|
|||
GDCLASS(NpcUnit, Node3D);
|
||||
static void _bind_methods();
|
||||
void remove_npc(EnemyBody *unit);
|
||||
void on_npc_death();
|
||||
void on_npc_death(EnemyBody *npc);
|
||||
void on_npc_awareness_changed(bool seen);
|
||||
void child_added(Node *node);
|
||||
void enter_tree();
|
||||
|
|
@ -28,6 +28,8 @@ public:
|
|||
float get_patrol_speed() const;
|
||||
void set_region(MapRegion *region);
|
||||
MapRegion *get_region() const;
|
||||
void set_drop_on_clear(Ref<PackedScene> object);
|
||||
Ref<PackedScene> get_drop_on_clear() const;
|
||||
|
||||
private:
|
||||
bool aware_of_player{ false };
|
||||
|
|
@ -35,6 +37,7 @@ private:
|
|||
PatrolPath *patrol_path{ nullptr };
|
||||
float patrol_speed{ 1.f };
|
||||
MapRegion *region{ nullptr };
|
||||
Ref<PackedScene> drop_on_clear{};
|
||||
};
|
||||
|
||||
#endif // !NPC_UNIT_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue