-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce4f31b
commit fbc2778
Showing
6 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "Player/PlayerJudgeStartRun.h" | ||
#include "Player/PlayerCounterForceRun.h" | ||
#include "Player/PlayerInput.h" | ||
#include "Util/PlayerCollisionUtil.h" | ||
#include "Util/StageSceneFunction.h" | ||
|
||
PlayerJudgeStartRun::PlayerJudgeStartRun(const al::LiveActor* player, const PlayerConst* pConst, | ||
const IUsePlayerCollision* collision, | ||
const PlayerInput* input, | ||
const PlayerCounterForceRun* counterForceRun, | ||
const IJudge* judgeWaterSurfaceRun) | ||
: mPlayer(player), mCollision(collision), mInput(input), mCounterForceRun(counterForceRun), | ||
mJudgeForceLand(judgeWaterSurfaceRun) {} | ||
|
||
bool PlayerJudgeStartRun::judge() const { | ||
if (!rs::isCollidedGround(mCollision)) | ||
return false; | ||
if (mCounterForceRun->isForceRun()) | ||
return true; | ||
if (rs::isJudge(mJudgeForceLand)) | ||
return false; | ||
if (mInput->isMove()) | ||
return true; | ||
return rs::isAutoRunOnGroundSkateCode(mPlayer, mCollision, 0.5f); | ||
} | ||
|
||
void PlayerJudgeStartRun::reset() {} | ||
|
||
void PlayerJudgeStartRun::update() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include <basis/seadTypes.h> | ||
|
||
#include "Player/IJudge.h" | ||
|
||
namespace al { | ||
class LiveActor; | ||
} | ||
class IUsePlayerCollision; | ||
class PlayerConst; | ||
class PlayerInput; | ||
class PlayerCounterForceRun; | ||
|
||
class PlayerJudgeStartRun : public IJudge { | ||
public: | ||
PlayerJudgeStartRun(const al::LiveActor* player, const PlayerConst* pConst, | ||
const IUsePlayerCollision* collision, const PlayerInput* input, | ||
const PlayerCounterForceRun* counterForceRun, | ||
const IJudge* judgeWaterSurfaceRun); | ||
|
||
void reset() override; | ||
void update() override; | ||
bool judge() const override; | ||
|
||
private: | ||
const al::LiveActor* mPlayer; | ||
const IUsePlayerCollision* mCollision; | ||
const PlayerInput* mInput; | ||
const PlayerCounterForceRun* mCounterForceRun; | ||
const IJudge* mJudgeForceLand; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters