feat: first basic enemy patrolling behaviour

This commit is contained in:
Sara 2025-07-20 21:41:22 +02:00
parent 7c4c75d193
commit 526f756736
15 changed files with 801 additions and 386 deletions

View file

@ -7,7 +7,6 @@ class State;
class StateMachine : public Node {
GDCLASS(StateMachine, Node);
static void _bind_methods();
void add_state(State *state);
void switch_to_state(State *state);
void ready();
void process(double delta);
@ -15,6 +14,10 @@ class StateMachine : public Node {
protected:
void _notification(int what);
public:
~StateMachine();
void add_state(State *state);
private:
State *current_state{ nullptr };
HashMap<StringName, State *> states{};