31 [[nodiscard]]
u16 checkpointId()
const {
32 return m_checkpointId;
35 [[nodiscard]] f32 raceCompletion()
const {
36 return m_raceCompletion;
39 [[nodiscard]] s8 jugemId()
const {
43 [[nodiscard]]
const std::array<Timer, 3> &lapTimers()
const {
47 [[nodiscard]]
const Timer &lapTimer(
size_t idx)
const {
48 ASSERT(idx < m_lapTimers.size());
49 return m_lapTimers[idx];
52 [[nodiscard]]
const Timer &raceTimer()
const {
56 [[nodiscard]]
const KPad *inputs()
const {
64 u16 nextCheckpointId)
const;
68 void endRace(
const Timer &finishTime);
73 f32 m_checkpointStartLapCompletion;
79 std::array<Timer, 3> m_lapTimers;
95 void endPlayerRace(u32 idx);
100 [[nodiscard]]
bool isStageReached(Stage stage)
const {
101 return static_cast<std::underlying_type_t<Stage>
>(m_stage) >=
102 static_cast<std::underlying_type_t<Stage>
>(stage);
105 [[nodiscard]] MapdataJugemPoint *jugemPoint()
const;
109 [[nodiscard]]
int getCountdownTimer()
const {
110 return STAGE_COUNTDOWN_DURATION - m_timer;
113 [[nodiscard]]
const Player &player()
const {
117 [[nodiscard]]
const TimerManager &timerManager()
const {
118 return m_timerManager;
121 [[nodiscard]] Stage stage()
const {
125 [[nodiscard]] u32 timer()
const {
130 static RaceManager *CreateInstance();
131 static void DestroyInstance();
133 [[nodiscard]]
static RaceManager *Instance() {
139 ~RaceManager()
override;
142 TimerManager m_timerManager;
147 static constexpr u16 STAGE_COUNTDOWN_DURATION = 240;
149 static RaceManager *s_instance;