1#pragma once
2
3#include <basis/seadTypes.h>
4#include <math/seadVector.h>
5
6namespace al {
7class LiveActor;
8} // namespace al
9
10class CoinRotateCalculator {
11public:
12 CoinRotateCalculator(al::LiveActor* actor);
13 void reset();
14 void update(const sead::Vector3f& force, bool checkWater);
15 void addFishingLineTouch();
16 f32 getRotate() const;
17 f32 getRotateSpeed() const;
18
19 void increaseObjCountOffset() { mObjCountOffset++; }
20
21 void setRotateOffset(f32 offset) { mRotateOffset = offset; }
22
23private:
24 al::LiveActor* mActor = nullptr;
25 f32 mRotate = 0.0f;
26 f32 mLastObjAngle = 0.0f;
27 s32 mForceFrames = 0;
28 f32 mForceOffset = 0.0f;
29 f32 mFishingLineOffset = 0.0f;
30 s32 mObjCountOffset = 0;
31 f32 mRotateOffset = 0.0f;
32 bool mIsInWater = false;
33};
34