| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | #include <math/seadQuat.h> |
| 5 | #include <math/seadVector.h> |
| 6 | |
| 7 | #include "Library/LiveActor/LiveActor.h" |
| 8 | |
| 9 | namespace al { |
| 10 | struct ActorInitInfo; |
| 11 | class AnimScaleController; |
| 12 | class HitSensor; |
| 13 | class SensorMsg; |
| 14 | } // namespace al |
| 15 | |
| 16 | class Pecho : public al::LiveActor { |
| 17 | public: |
| 18 | Pecho(const char* name); |
| 19 | |
| 20 | void init(const al::ActorInitInfo& initInfo) override; |
| 21 | bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 22 | al::HitSensor* self) override; |
| 23 | void attackSensor(al::HitSensor* self, al::HitSensor* other) override; |
| 24 | void control() override; |
| 25 | |
| 26 | void startLiquidFast(); |
| 27 | void startLiquid(); |
| 28 | void startLiquidCap(); |
| 29 | void updateVelocity(); |
| 30 | bool tryStartFind(); |
| 31 | void updateVelocityEscapeWallAndFall(f32 force, f32 velocity); |
| 32 | |
| 33 | bool isEnablePush() const; |
| 34 | bool isEnableAttack() const; |
| 35 | bool isEnableCap() const; |
| 36 | bool isEnableSendPechoSpot() const; |
| 37 | |
| 38 | void exeAppear(); |
| 39 | void exeAttackSuccess(); |
| 40 | void exeWait(); |
| 41 | void exeFind(); |
| 42 | void exeMove(); |
| 43 | void exeLiquidSign(); |
| 44 | void exeLiquidStart(); |
| 45 | void exeLiquid(); |
| 46 | void exeLiquidEnd(); |
| 47 | void exeReset(); |
| 48 | |
| 49 | private: |
| 50 | al::AnimScaleController* mAnimScaleController = nullptr; |
| 51 | sead::Quatf mStartingQuat = sead::Quatf::unit; |
| 52 | sead::Vector3f mStartingTrans = sead::Vector3f::zero; |
| 53 | sead::Quatf mNextBodyOrientation; |
| 54 | sead::Vector3f mWaitTrans; |
| 55 | sead::Quatf mBodyOrientation = sead::Quatf::unit; |
| 56 | sead::Vector3f mMoment = sead::Vector3f::zero; |
| 57 | sead::Vector3f mVelocity = sead::Vector3f::zero; |
| 58 | |
| 59 | const char* mLiquidStartAction = "LiquidStart"; |
| 60 | bool mIsStartLiquidFast = false; |
| 61 | bool mIsWaitTiltCounterClockwise = true; |
| 62 | bool mIsBubbleReaction = false; |
| 63 | }; |
| 64 |