-
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.
Player: Implement PlayerJudgeStartSquat (#88)
- Loading branch information
1 parent
e32c4b6
commit 20c7664
Showing
5 changed files
with
48 additions
and
4 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,18 @@ | ||
#include "Player/PlayerJudgeStartSquat.h" | ||
|
||
#include "Player/PlayerCarryKeeper.h" | ||
#include "Player/PlayerCounterForceRun.h" | ||
#include "Player/PlayerInput.h" | ||
|
||
PlayerJudgeStartSquat::PlayerJudgeStartSquat(const PlayerInput* input, | ||
const PlayerCounterForceRun* counterForceRun, | ||
const PlayerCarryKeeper* carryKeeper) | ||
: mInput(input), mCounterForceRun(counterForceRun), mCarryKeeper(carryKeeper) {} | ||
|
||
bool PlayerJudgeStartSquat::judge() const { | ||
return !mCarryKeeper->isCarry() && mInput->isHoldSquat() && mCounterForceRun->getCounter() < 1; | ||
} | ||
|
||
void PlayerJudgeStartSquat::reset() {} | ||
|
||
void PlayerJudgeStartSquat::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,24 @@ | ||
#pragma once | ||
|
||
#include "Library/HostIO/HioNode.h" | ||
|
||
#include "Player/IJudge.h" | ||
|
||
class PlayerInput; | ||
class PlayerCounterForceRun; | ||
class PlayerCarryKeeper; | ||
|
||
class PlayerJudgeStartSquat : public al::HioNode, public IJudge { | ||
public: | ||
PlayerJudgeStartSquat(const PlayerInput*, const PlayerCounterForceRun*, | ||
const PlayerCarryKeeper*); | ||
void reset(); | ||
void update(); | ||
bool judge() const; | ||
|
||
private: | ||
const PlayerInput* mInput; | ||
const PlayerCounterForceRun* mCounterForceRun; | ||
const PlayerCarryKeeper* mCarryKeeper; | ||
}; | ||
static_assert(sizeof(PlayerJudgeStartSquat) == 0x20); |