| 1 | #pragma once |
| 2 | |
| 3 | #include "Library/LiveActor/LiveActor.h" |
| 4 | |
| 5 | namespace al { |
| 6 | class ConveyerKeyKeeper; |
| 7 | |
| 8 | class ConveyerStep : public LiveActor { |
| 9 | public: |
| 10 | ConveyerStep(const char* name); |
| 11 | |
| 12 | void init(const ActorInitInfo& info) override; |
| 13 | bool receiveMsg(const SensorMsg* message, HitSensor* other, HitSensor* self) override; |
| 14 | |
| 15 | void setHost(LiveActor* host); |
| 16 | void setConveyerKeyKeeper(const ConveyerKeyKeeper* conveyerKeyKeeper, f32 coord); |
| 17 | void setTransByCoord(f32 coord, bool isForwards); |
| 18 | void setTransByCoord(f32 coord, bool isForwards, bool isForceReset); |
| 19 | void setTransAndResetByCoord(f32 coord); |
| 20 | |
| 21 | void exeWait(); |
| 22 | |
| 23 | private: |
| 24 | LiveActor* mHost = nullptr; |
| 25 | const ConveyerKeyKeeper* mConveyerKeyKeeper = nullptr; |
| 26 | const char* mKeyHitReactionName = nullptr; |
| 27 | const char* mActionName = nullptr; |
| 28 | f32 mCurrentCoord = 0.0f; |
| 29 | f32 mMaxCoord = 0.0f; |
| 30 | bool mIsExist = true; |
| 31 | }; |
| 32 | } // namespace al |
| 33 | |