| 1 | #include "Player/PlayerJudgeForceSlopeSlide.h" |
|---|---|
| 2 | |
| 3 | #include "Util/PlayerCollisionUtil.h" |
| 4 | #include "Util/PlayerUtil.h" |
| 5 | |
| 6 | PlayerJudgeForceSlopeSlide::PlayerJudgeForceSlopeSlide(const al::LiveActor* player, |
| 7 | const PlayerConst* pConst, |
| 8 | const IUsePlayerCollision* collider) |
| 9 | : mPlayer(player), mConst(pConst), mCollider(collider) {} |
| 10 | |
| 11 | void PlayerJudgeForceSlopeSlide::reset() { |
| 12 | mIsForceSlide = false; |
| 13 | } |
| 14 | |
| 15 | void PlayerJudgeForceSlopeSlide::update() { |
| 16 | mIsForceSlide = rs::isOnGroundForceSlideCode(mPlayer, mCollider, mConst); |
| 17 | } |
| 18 | |
| 19 | bool PlayerJudgeForceSlopeSlide::judge() const { |
| 20 | return !rs::isPlayerHack(mPlayer) && mIsForceSlide; |
| 21 | } |
| 22 |