mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-01 09:42:39 +00:00
46 lines
No EOL
1.4 KiB
C++
46 lines
No EOL
1.4 KiB
C++
#pragma once
|
|
|
|
#include <math.h>
|
|
#include "al/camera/CameraTicket.h"
|
|
#include "gamemode/GameModeBase.hpp"
|
|
#include "gamemode/GameModeInfoBase.hpp"
|
|
#include "server/gamemode/GameModeConfigMenu.hpp"
|
|
#include "server/gamemode/GameModeTimer.hpp"
|
|
#include "server/HideAndSeekConfigMenu.hpp"
|
|
|
|
struct HideAndSeekInfo : GameModeInfoBase {
|
|
HideAndSeekInfo() { mMode = GameMode::HIDEANDSEEK; }
|
|
bool mIsPlayerIt = false;
|
|
bool mIsUseGravity = false;
|
|
bool mIsUseGravityCam = false;
|
|
GameTime mHidingTime;
|
|
};
|
|
|
|
class HideAndSeekMode : public GameModeBase {
|
|
public:
|
|
HideAndSeekMode(const char* name);
|
|
|
|
void init(GameModeInitInfo const& info) override;
|
|
|
|
virtual void begin() override;
|
|
virtual void update() override;
|
|
virtual void end() override;
|
|
|
|
bool isPlayerIt() const { return mInfo->mIsPlayerIt; };
|
|
|
|
void setPlayerTagState(bool state) { mInfo->mIsPlayerIt = state; }
|
|
|
|
void enableGravityMode() {mInfo->mIsUseGravity = true;}
|
|
void disableGravityMode() { mInfo->mIsUseGravity = false; }
|
|
bool isUseGravity() const { return mInfo->mIsUseGravity; }
|
|
|
|
void setCameraTicket(al::CameraTicket *ticket) {mTicket = ticket;}
|
|
|
|
private:
|
|
float mInvulnTime = 0.0f;
|
|
GameModeTimer* mModeTimer = nullptr;
|
|
HideAndSeekIcon *mModeLayout = nullptr;
|
|
HideAndSeekInfo* mInfo = nullptr;
|
|
al::CameraTicket *mTicket = nullptr;
|
|
|
|
}; |