-
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 PlayerJudgeForceSlopeSlide
- Loading branch information
1 parent
318b65c
commit f3f607d
Showing
5 changed files
with
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "Player/PlayerJudgeForceSlopeSlide.h" | ||
|
||
#include "Util/PlayerCollisionUtil.h" | ||
#include "Util/PlayerUtil.h" | ||
|
||
PlayerJudgeForceSlopeSlide::PlayerJudgeForceSlopeSlide(const al::LiveActor* player, | ||
const PlayerConst* pConst, | ||
const IUsePlayerCollision* collider) | ||
: mPlayer(player), mConst(pConst), mCollider(collider) {} | ||
|
||
void PlayerJudgeForceSlopeSlide::reset() { | ||
mIsJudge = false; | ||
} | ||
|
||
void PlayerJudgeForceSlopeSlide::update() { | ||
mIsJudge = rs::isOnGroundForceSlideCode(mPlayer, mCollider, mConst); | ||
} | ||
|
||
bool PlayerJudgeForceSlopeSlide::judge() const { | ||
return !rs::isPlayerHack(mPlayer) && mIsJudge; | ||
} |
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,26 @@ | ||
#pragma once | ||
|
||
#include "Library/HostIO/HioNode.h" | ||
|
||
#include "Player/IJudge.h" | ||
|
||
namespace al { | ||
class LiveActor; | ||
} | ||
class IUsePlayerCollision; | ||
class PlayerConst; | ||
|
||
class PlayerJudgeForceSlopeSlide : public al::HioNode, IJudge { | ||
public: | ||
PlayerJudgeForceSlopeSlide(const al::LiveActor* player, const PlayerConst* pConst, | ||
const IUsePlayerCollision* collider); | ||
void reset() override; | ||
void update() override; | ||
bool judge() const override; | ||
|
||
private: | ||
const al::LiveActor* mPlayer; | ||
const PlayerConst* mConst; | ||
const IUsePlayerCollision* mCollider; | ||
bool mIsJudge = false; | ||
}; |
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,11 @@ | ||
#pragma once | ||
|
||
namespace al { | ||
class LiveActor; | ||
} | ||
|
||
namespace rs { | ||
|
||
bool isPlayerHack(const al::LiveActor*); | ||
|
||
} |