| 1 | #pragma once |
| 2 | |
| 3 | #include "Library/LiveActor/LiveActor.h" |
| 4 | |
| 5 | namespace al { |
| 6 | class EnemyStateBlowDown; |
| 7 | struct EnemyStateBlowDownParam; |
| 8 | } // namespace al |
| 9 | |
| 10 | class EnemyCap : public al::LiveActor { |
| 11 | public: |
| 12 | static EnemyCap* createEnemyCap(const char*); |
| 13 | |
| 14 | EnemyCap(const char*); |
| 15 | |
| 16 | void initPartsFixFile(al::LiveActor*, const al::ActorInitInfo&, const char*, const char*); |
| 17 | |
| 18 | void makeActorAlive() override; |
| 19 | void updatePose(); |
| 20 | void calcAnim() override; |
| 21 | |
| 22 | void exeWait(); |
| 23 | bool syncHostVisible(); |
| 24 | void exeBlowDown(); |
| 25 | void startBlowDown(const al::HitSensor* source); |
| 26 | void startBlowDown(); |
| 27 | bool isBlowDown() const; |
| 28 | void setBlowDownParam(const al::EnemyStateBlowDownParam*); |
| 29 | |
| 30 | al::LiveActor* getCap() { return mCap; }; |
| 31 | |
| 32 | al::EnemyStateBlowDown* getStateBlowDown() { return mStateBlowDown; }; |
| 33 | |
| 34 | private: |
| 35 | al::LiveActor* mCap = nullptr; |
| 36 | const sead::Matrix34f* mCapBaseMtx = nullptr; |
| 37 | bool mIsNotAtOrigin = true; |
| 38 | sead::Vector3f mLocalTrans = {0.0f, 0.0f, 0.0f}; |
| 39 | sead::Vector3f mLocalRotate = {0.0f, 0.0f, 0.0f}; |
| 40 | sead::Vector3f mLocalScale = {1.0f, 1.0f, 1.0f}; |
| 41 | bool mIsCapVisible = false; |
| 42 | bool mIsUseFollowMtxScale = false; |
| 43 | bool field_142 = false; |
| 44 | bool mIsUseLocalScale = true; |
| 45 | al::EnemyStateBlowDown* mStateBlowDown = nullptr; |
| 46 | }; |
| 47 | |
| 48 | namespace rs { |
| 49 | EnemyCap* tryCreateEnemyCap(al::LiveActor*, const al::ActorInitInfo&); |
| 50 | EnemyCap* tryCreateEnemyCap(al::LiveActor*, const al::ActorInitInfo&, const char*); |
| 51 | EnemyCap* tryCreateEnemyCapSuffix(al::LiveActor*, const al::ActorInitInfo&, const char*, |
| 52 | const char*); |
| 53 | bool tryStartEnemyCapBlowDown(EnemyCap*, const al::HitSensor*); |
| 54 | bool tryStartEnemyCapBlowDown(EnemyCap*); |
| 55 | bool tryAppearEnemyCap(EnemyCap*); |
| 56 | bool isOnEnemyCap(EnemyCap*); |
| 57 | } // namespace rs |
| 58 | |