| 1 | #include "Player/PlayerJudgeStartHipDrop.h" |
|---|---|
| 2 | |
| 3 | #include "Player/IPlayerModelChanger.h" |
| 4 | #include "Player/PlayerConst.h" |
| 5 | #include "Player/PlayerInput.h" |
| 6 | #include "Util/PlayerCollisionUtil.h" |
| 7 | |
| 8 | PlayerJudgeStartHipDrop::PlayerJudgeStartHipDrop(const PlayerConst* playerConst, |
| 9 | const PlayerInput* playerInput, |
| 10 | const IUsePlayerHeightCheck* playerHeightCheck, |
| 11 | const IPlayerModelChanger* playerModelChanger) |
| 12 | : mConst(playerConst), mInput(playerInput), mHeightCheck(playerHeightCheck), |
| 13 | mModelChanger(playerModelChanger) {} |
| 14 | |
| 15 | bool PlayerJudgeStartHipDrop::judge() const { |
| 16 | if (mModelChanger->is2DModel() || !mInput->isTriggerHipDrop()) |
| 17 | return false; |
| 18 | |
| 19 | return !(rs::getGroundHeight(mHeightCheck) < mConst->getHipDropHeight()); |
| 20 | } |
| 21 |