1#pragma once
2
3#include <math/seadQuat.h>
4#include <math/seadVector.h>
5
6#include "Library/LiveActor/LiveActor.h"
7
8namespace al {
9
10struct ActorInitInfo;
11class HitSensor;
12class ParabolicPath;
13class SensorMsg;
14} // namespace al
15
16class VolleyballNpc;
17
18class VolleyballBall : public al::LiveActor {
19public:
20 VolleyballBall(const char* name);
21
22 void init(const al::ActorInitInfo& initInfo) override;
23 void control() override;
24 bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other,
25 al::HitSensor* self) override;
26 void attackSensor(al::HitSensor* self, al::HitSensor* other) override;
27
28 void attack(const sead::Vector3f& startPosition, const sead::Vector3f& endPosition,
29 f32 attackSpeed);
30 void toss(const sead::Vector3f& startPosition, const sead::Vector3f& endPosition);
31 void reset();
32
33 bool isMiss() const;
34 bool isReturnEnd() const;
35 bool isTossEnd() const;
36 bool isActive() const;
37 bool isRetry() const;
38 bool isRetryEnd() const;
39
40 void exeWait();
41 void exeAttack();
42 void exeOnGround();
43 void endOnGround();
44 void exeReturn();
45 void exeReturnSmash();
46 void exeReturnEnd();
47 void exeMiss();
48 void exeMissReaction();
49 void exeToss();
50 void exeTossEnd();
51 void exeRetry();
52 void exeRetryEnd();
53
54private:
55 sead::Vector3f mEndPosition = sead::Vector3f::zero;
56 al::ParabolicPath* mAttackPath = nullptr;
57 al::ParabolicPath* mReturnPath = nullptr;
58 f32 mAttackSpeed = 0.0f;
59 s32 mPathTime = 0;
60 VolleyballNpc* mNpc = nullptr;
61 bool _138 = false;
62 sead::Quatf mOrientation = sead::Quatf::unit;
63 s32 mLastSmashCoins = 0;
64 s32 mMissReactionDelay = 0;
65 s32 mMissDelay = 0;
66};
67