feat: generalising of NPC logic
This commit is contained in:
parent
41bcf4cdf7
commit
1625a11c42
6 changed files with 74 additions and 37 deletions
|
|
@ -26,21 +26,19 @@ public:
|
|||
EnemyWretched *get_target() const;
|
||||
};
|
||||
|
||||
class WretchedPatrolState : public PatrolState {
|
||||
GDCLASS(WretchedPatrolState, PatrolState);
|
||||
class WretchedPatrolState : public EnemyPatrolState {
|
||||
GDCLASS(WretchedPatrolState, EnemyPatrolState);
|
||||
static void _bind_methods() {}
|
||||
|
||||
public:
|
||||
String get_next_state() const override;
|
||||
};
|
||||
|
||||
class WretchedChaseState : public WretchedState {
|
||||
GDCLASS(WretchedChaseState, WretchedState);
|
||||
class WretchedChaseState : public EnemyChaseState {
|
||||
GDCLASS(WretchedChaseState, EnemyChaseState);
|
||||
static void _bind_methods() {}
|
||||
|
||||
public:
|
||||
virtual void enter_state() override;
|
||||
virtual void process(double delta) override;
|
||||
virtual String get_next_state() const override;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue