| 1 | #include "Player/PlayerJudgeInvalidateInputFall.h" |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | |
| 5 | #include "Library/LiveActor/ActorPoseUtil.h" |
| 6 | |
| 7 | #include "Player/PlayerAreaChecker.h" |
| 8 | #include "Util/PlayerCollisionUtil.h" |
| 9 | |
| 10 | PlayerJudgeInvalidateInputFall::PlayerJudgeInvalidateInputFall(const al::LiveActor* actor, |
| 11 | const PlayerAreaChecker* areaChecker, |
| 12 | const IUsePlayerCollision* collision) |
| 13 | : mActor(actor), mAreaChecker(areaChecker), mCollision(collision) {} |
| 14 | |
| 15 | void PlayerJudgeInvalidateInputFall::reset() { |
| 16 | mInvalidateInputFallArea = nullptr; |
| 17 | } |
| 18 | |
| 19 | void PlayerJudgeInvalidateInputFall::update() { |
| 20 | mInvalidateInputFallArea = nullptr; |
| 21 | if (!rs::isCollidedGround(mCollision)) |
| 22 | mInvalidateInputFallArea = mAreaChecker->tryFindInvalidateInputFall(pos: al::getTrans(actor: mActor)); |
| 23 | } |
| 24 |