1#pragma once
2
3#include <math/seadVector.h>
4
5#include "Library/Nerve/NerveStateBase.h"
6
7struct ParamEnemyStateRunAway {
8 f32 field_0;
9 f32 field_4;
10 f32 field_8;
11 f32 field_c;
12 f32 field_10;
13 bool shouldFaceDir;
14};
15
16class EnemyStateRunAway : public al::ActorStateBase {
17public:
18 EnemyStateRunAway(al::LiveActor*, const ParamEnemyStateRunAway*, const char*);
19
20 void appear() override;
21
22 void calcRunDirBase(sead::Vector3f*);
23
24 void exeRun();
25 void exePanicRun();
26 void exePanicRunCollided();
27
28private:
29 al::LiveActor* mScaredOfActor = nullptr;
30 const ParamEnemyStateRunAway* mParam = nullptr;
31 sead::Vector3f mFrontDir = {0.0f, 0.0f, 0.0f};
32 const char* mAnimName = nullptr;
33 bool mIsCollidedWallVelocity = false;
34 bool mIsNeedToFaceToDirection = false;
35};
36