| 1 | #pragma once |
| 2 | |
| 3 | #include "Library/LiveActor/LiveActor.h" |
| 4 | |
| 5 | namespace al { |
| 6 | class AddDemoInfo; |
| 7 | class CollisionObj; |
| 8 | class CameraTicket; |
| 9 | class MtxConnector; |
| 10 | } // namespace al |
| 11 | class AppearSwitchSave; |
| 12 | |
| 13 | class TrampleSwitch : public al::LiveActor { |
| 14 | public: |
| 15 | TrampleSwitch(const char* actorName); |
| 16 | |
| 17 | void init(const al::ActorInitInfo& info) override; |
| 18 | |
| 19 | void offSwitch(); |
| 20 | void resetSwitch(); |
| 21 | |
| 22 | void initAfterPlacement() override; |
| 23 | void control() override; |
| 24 | |
| 25 | void exeOffWait(); |
| 26 | void exeOn(); |
| 27 | void exeOnDemoWaitStart(); |
| 28 | void exeOnDemo(); |
| 29 | void exeOnWait(); |
| 30 | void exeOff(); |
| 31 | |
| 32 | bool isOn() const; |
| 33 | |
| 34 | bool receiveMsg(const al::SensorMsg* message, al::HitSensor* other, |
| 35 | al::HitSensor* self) override; |
| 36 | |
| 37 | bool trySetNerveOn(); |
| 38 | |
| 39 | private: |
| 40 | bool mIsFacingUp = false; |
| 41 | al::CollisionObj* mCollisionBody = nullptr; |
| 42 | al::AddDemoInfo* mAddDemoInfo = nullptr; |
| 43 | al::CameraTicket* mDemoCamera = nullptr; |
| 44 | al::MtxConnector* mMtxConnector = nullptr; |
| 45 | AppearSwitchSave* mAppearSwitchSave = nullptr; |
| 46 | }; |
| 47 | |