| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | |
| 5 | #include "Library/Layout/LayoutActor.h" |
| 6 | |
| 7 | namespace al { |
| 8 | class LayoutInitInfo; |
| 9 | class LiveActor; |
| 10 | } // namespace al |
| 11 | |
| 12 | class CoinCounter : public al::LayoutActor { |
| 13 | public: |
| 14 | CoinCounter(const char* name, const al::LayoutInitInfo& initInfo, bool isCoin); |
| 15 | |
| 16 | void kill() override; |
| 17 | |
| 18 | void updatePanel(u32 coinCount, s32 numDigits); |
| 19 | bool isWait() const; |
| 20 | void tryStart(); |
| 21 | void updateCountImmidiate(); |
| 22 | void tryEnd(); |
| 23 | void startCountAnim(s32 coinNum); |
| 24 | bool tryUpdateCount(); |
| 25 | s32 getCountFromData() const; |
| 26 | s32 getCountTotalFromData() const; |
| 27 | |
| 28 | void exeAppear(); |
| 29 | void exeWait(); |
| 30 | void exeEnd(); |
| 31 | void exeAdd(); |
| 32 | void exeSub(); |
| 33 | void exeCountAnimAdd(); |
| 34 | void exeCountAnimSub(); |
| 35 | |
| 36 | private: |
| 37 | s32 mPrevCoinCount = 0; |
| 38 | s32 mCoinNum = 0; |
| 39 | s32 mTotalCoins = 0; |
| 40 | s32 mNumDigits = -1; |
| 41 | bool mIsCoin = false; |
| 42 | const char* mPanelName = nullptr; |
| 43 | s32 mAnimationCount = 0; |
| 44 | bool mIsUpdateCount = true; |
| 45 | }; |
| 46 |