| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <math/seadVector.h> |
| 5 | |
| 6 | #include "Library/LiveActor/LiveActor.h" |
| 7 | |
| 8 | namespace al { |
| 9 | struct ActorInitInfo; |
| 10 | class HitSensor; |
| 11 | class SensorMsg; |
| 12 | } // namespace al |
| 13 | |
| 14 | class CoinStackGroup; |
| 15 | |
| 16 | class CoinStack : public al::LiveActor { |
| 17 | public: |
| 18 | CoinStack(const char* name); |
| 19 | virtual ~CoinStack() = default; |
| 20 | |
| 21 | void init(const al::ActorInitInfo& initInfo) override; |
| 22 | bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 23 | al::HitSensor* self) override; |
| 24 | |
| 25 | CoinStack* getBelow(); |
| 26 | CoinStack* getAbove(); |
| 27 | void makeStackAppear(); |
| 28 | void makeStackDisappear(); |
| 29 | void changeAlpha(f32 alphaMask); |
| 30 | f32 getFallSpeed(); |
| 31 | void setAbove(CoinStack* stack); |
| 32 | void setBelow(CoinStack* stack); |
| 33 | void signalFall(u32 delay, f32 speed); |
| 34 | void postInit(CoinStackGroup* coinStackGroup, const sead::Vector3f& transY, CoinStack* below, |
| 35 | const sead::Vector3f& clippingPos, f32 clippingRadius, const f32* fallDistance); |
| 36 | |
| 37 | void exeWait(); |
| 38 | void exeFloat(); |
| 39 | void exeFall(); |
| 40 | void exeLand(); |
| 41 | void exeCollected(); |
| 42 | |
| 43 | f32 getTransY() const { return mTransY; } |
| 44 | |
| 45 | private: |
| 46 | const f32* mExternalFallDistance = nullptr; |
| 47 | f32 mTransY = 0.0f; |
| 48 | f32 mLandHeight = 0.0f; |
| 49 | s32 mFloatDuration = 0; |
| 50 | f32 mFallSpeed = 0.0f; |
| 51 | CoinStackGroup* mCoinStackGroup = nullptr; |
| 52 | sead::Vector3f mClippingPos; |
| 53 | f32 mClippingRadius = 0.0f; |
| 54 | CoinStack* mStackBelow = nullptr; |
| 55 | CoinStack* mStackAbove = nullptr; |
| 56 | }; |
| 57 |