| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <math/seadVector.h> |
| 4 | |
| 5 | #include "Library/Nerve/NerveExecutor.h" |
| 6 | |
| 7 | namespace al { |
| 8 | class LayoutActor; |
| 9 | class LayoutInitInfo; |
| 10 | class PlayerHolder; |
| 11 | class SubCameraRenderer; |
| 12 | } // namespace al |
| 13 | class CounterLife; |
| 14 | |
| 15 | class CounterLifeCtrl : public al::NerveExecutor { |
| 16 | public: |
| 17 | CounterLifeCtrl(const al::LayoutInitInfo& info, const al::PlayerHolder* player_holder, |
| 18 | const al::SubCameraRenderer* sub_camera_renderer); |
| 19 | |
| 20 | void setCount(s32 count); |
| 21 | bool tryUpdateCount(s32 count); |
| 22 | bool tryStartDemoLifeUp(bool is_hack_koopa); |
| 23 | void appear(); |
| 24 | void end(); |
| 25 | void kill(); |
| 26 | void killAllLayout(); |
| 27 | bool isEndLifeDemo() const; |
| 28 | |
| 29 | void exeAppear(); |
| 30 | void setTransAllLayout(const sead::Vector3f& trans); |
| 31 | const sead::Vector3f& getInitTrans() const; |
| 32 | void appearAllLayout(); |
| 33 | void startAllLayout(); |
| 34 | CounterLife* getCurrentLayout() const; |
| 35 | void exeWait(); |
| 36 | void waitAllLayout(); |
| 37 | void updateTransAllLayout(); |
| 38 | bool tryChangeCount(); |
| 39 | void exeEnd(); |
| 40 | void exeDead(); |
| 41 | void exeCountStartFadeOut(); |
| 42 | void exeCountStartFadeIn(); |
| 43 | void exeCount(); |
| 44 | void startCountAnim(s32 target); |
| 45 | void exeCountEnd(); |
| 46 | void exeDemoLifeMaxUpStartFadeIn(); |
| 47 | void updateTrans(al::LayoutActor* layout); |
| 48 | void exeDemoLifeMaxUpAddLife(); |
| 49 | void exeDemoLifeMaxUpWaitForMove(); |
| 50 | void exeDemoLifeMaxUpMove(); |
| 51 | void calcLayoutTransByPlayer(sead::Vector3f* out); |
| 52 | void exeDemoLifeMaxUpUnite(); |
| 53 | void startActionAllLayout(const char* action_name, const char* pane_name); |
| 54 | |
| 55 | private: |
| 56 | const al::PlayerHolder* mPlayerHolder; |
| 57 | CounterLife* mCounterLife = nullptr; |
| 58 | CounterLife* mCounterLifeUp = nullptr; |
| 59 | CounterLife* mCounterLifeKids = nullptr; |
| 60 | sead::Vector3f mCounterLifeInitTrans = sead::Vector3f::zero; |
| 61 | sead::Vector3f mCounterLifeKidsInitTrans = sead::Vector3f::zero; |
| 62 | sead::Vector3f mCountEndTrans = sead::Vector3f::zero; |
| 63 | s32 mCount = 0; |
| 64 | s32 mTargetCount = 0; |
| 65 | const al::SubCameraRenderer* mSubCameraRenderer; |
| 66 | s32 mSubjectiveCameraWaitTime = 0; |
| 67 | bool mIsHackKoopa = false; |
| 68 | }; |
| 69 | |
| 70 | static_assert(sizeof(CounterLifeCtrl) == 0x70); |
| 71 |