feat: first basic enemy patrolling behaviour
This commit is contained in:
parent
7c4c75d193
commit
526f756736
15 changed files with 801 additions and 386 deletions
26
modules/wave_survival/patrol_path.h
Normal file
26
modules/wave_survival/patrol_path.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef PATROL_PATH_H
|
||||
#define PATROL_PATH_H
|
||||
|
||||
#include "scene/3d/node_3d.h"
|
||||
|
||||
class PatrolPath : public Node3D {
|
||||
GDCLASS(PatrolPath, Node3D);
|
||||
static void _bind_methods();
|
||||
void child_added(Node *child);
|
||||
void child_removed(Node *child);
|
||||
void enter_tree();
|
||||
|
||||
protected:
|
||||
void _notification(int what);
|
||||
|
||||
public:
|
||||
int point_count() const;
|
||||
Vector3 point_at(int &index) const;
|
||||
Vector3 point_at_unchecked(int const index) const;
|
||||
int get_closest_point(Vector3 global_position);
|
||||
|
||||
private:
|
||||
Vector<Node3D *> path{};
|
||||
};
|
||||
|
||||
#endif // !PATROL_PATH_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue