feat: defining map region unit un-/registering behaviour
This commit is contained in:
parent
92c38e54b6
commit
d8ae45df0f
7 changed files with 87 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ class NpcUnit;
|
|||
class EnemyBody : public CharacterBody3D {
|
||||
GDCLASS(EnemyBody, CharacterBody3D);
|
||||
static void _bind_methods();
|
||||
void on_child_added(Node *node);
|
||||
void ready();
|
||||
void physics_process(double delta);
|
||||
|
||||
|
|
@ -20,6 +21,7 @@ public:
|
|||
void set_unit(NpcUnit *unit);
|
||||
NpcUnit *get_unit() const;
|
||||
|
||||
HealthStatus *get_health() const;
|
||||
NavigationAgent3D *get_nav() const;
|
||||
void set_movement_speed(float value);
|
||||
float get_movement_speed() const;
|
||||
|
|
@ -33,6 +35,7 @@ private:
|
|||
|
||||
StateMachine *fsm{ nullptr };
|
||||
NpcUnit *unit{ nullptr };
|
||||
HealthStatus *health{ nullptr };
|
||||
NavigationAgent3D *nav{ nullptr };
|
||||
Vector2 unit_offset{ 0, 0 };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue