INCOMPLETE: Player: Implement PlayerJudgeStartRise

This commit is contained in:
MonsterDruide1 2024-06-03 20:55:08 +02:00
parent 68f549f2d9
commit f601ab46e5
3 changed files with 49 additions and 6 deletions

View File

@ -2,12 +2,12 @@
class IPlayerModelChanger {
public:
virtual bool isFireFlower();
virtual bool isMini();
virtual bool isChange();
virtual bool is2DModel();
virtual bool isHiddenModel();
virtual bool isHiddenShadowMask();
virtual bool isFireFlower() const;
virtual bool isMini() const;
virtual bool isChange() const;
virtual bool is2DModel() const;
virtual bool isHiddenModel() const;
virtual bool isHiddenShadowMask() const;
virtual void resetPosition();
virtual void hideModel();
virtual void hideSilhouette();

View File

@ -0,0 +1,18 @@
#include "Player/PlayerJudgeStartRise.h"
#include "Library/LiveActor/ActorPoseKeeper.h"
#include "Player/IPlayerModelChanger.h"
PlayerJudgeStartRise::PlayerJudgeStartRise(const al::LiveActor* player, const PlayerAreaChecker* areaChecker,
const IPlayerModelChanger* modelChanger)
: mPlayer(player), mAreaChecker(areaChecker), mModelChanger(modelChanger) {}
void PlayerJudgeStartRise::reset() {}
void PlayerJudgeStartRise::update() {}
bool PlayerJudgeStartRise::judge() const {
if(mModelChanger->is2DModel()) return false;
return mAreaChecker->isInRise(al::getTrans(mPlayer));
}

View File

@ -0,0 +1,25 @@
#pragma once
#include "Player/IJudge.h"
namespace al {
class LiveActor;
}
class PlayerAreaChecker;
class IPlayerModelChanger;
class PlayerJudgeStartRise : public IJudge {
public:
PlayerJudgeStartRise(const al::LiveActor* player, const PlayerAreaChecker* areaChecker,
const IPlayerModelChanger* modelChanger);
void reset() override;
void update() override;
bool judge() const override;
private:
const al::LiveActor* mPlayer;
const PlayerAreaChecker* mAreaChecker;
const IPlayerModelChanger* mModelChanger;
};
static_assert(sizeof(PlayerJudgeStartRise) == 0x20);