#include <RaceManager.hh>
Manages the timers that track the stages of a race. Also acts as the interface between the physics engine and CourseMap.
The physics engine leverages the RaceManager in order to determine what stage of the race we're in, as that affects several things like acceleration. This class also retrieves the player start position from CourseMap and communicates it to the physics engine.
Definition at line 19 of file RaceManager.hh.
Classes | |
class | Player |
Public Types | |
enum class | Stage { Intro = 0 , Countdown = 1 , Race = 2 , FinishLocal = 3 , FinishGlobal = 4 } |
Public Member Functions | |
void | init () |
void | findKartStartPoint (EGG::Vector3f &pos, EGG::Vector3f &angles) |
void | endPlayerRace (u32 idx) |
void | calc () |
bool | isStageReached (Stage stage) const |
MapdataJugemPoint * | jugemPoint () const |
Static Public Member Functions | |
static RaceManager * | CreateInstance () |
static void | DestroyInstance () |
static RaceManager * | Instance () |
Getters | |
int | getCountdownTimer () const |
const Player & | player () const |
const TimerManager & | timerManager () const |
Stage | stage () const |
u32 | timer () const |
Private Attributes | |
Random | m_random |
Player | m_player |
TimerManager | m_timerManager |
Stage | m_stage |
u16 | m_introTimer |
u32 | m_timer |
Static Private Attributes | |
static constexpr u16 | STAGE_COUNTDOWN_DURATION = 240 |
static constexpr u32 | RNG_SEED = 0x74A1B095 |
static RaceManager * | s_instance = nullptr |
Additional Inherited Members | |
![]() | |
![]() | |
static constexpr u16 | getLinkOffset () |
|
strong |
Definition at line 85 of file RaceManager.hh.
|
private0x805327A0 |
Definition at line 91 of file RaceManager.cc.
|
overrideprivate0x80532E3C |
Definition at line 95 of file RaceManager.cc.
|
0x805331B4 |
Definition at line 42 of file RaceManager.cc.
|
static0x80532084 |
Definition at line 76 of file RaceManager.cc.
|
static0x805320D4 |
Definition at line 83 of file RaceManager.cc.
|
0x80533C6C |
Definition at line 36 of file RaceManager.cc.
|
0x805362DC |
Definition at line 20 of file RaceManager.cc.
|
inlinenodiscard |
Definition at line 110 of file RaceManager.hh.
|
0x80532F88 |
Definition at line 14 of file RaceManager.cc.
|
inlinestaticnodiscard |
Definition at line 134 of file RaceManager.hh.
|
inlinenodiscard0x80536230 |
Definition at line 101 of file RaceManager.hh.
|
nodiscard0x8053621C |
Definition at line 70 of file RaceManager.cc.
|
inlinenodiscard |
Definition at line 114 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 122 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 126 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 118 of file RaceManager.hh.
|
private |
Definition at line 146 of file RaceManager.hh.
|
private |
Definition at line 143 of file RaceManager.hh.
|
private |
Definition at line 142 of file RaceManager.hh.
|
private |
Definition at line 145 of file RaceManager.hh.
|
private |
Definition at line 147 of file RaceManager.hh.
|
private |
Definition at line 144 of file RaceManager.hh.
|
staticconstexprprivate |
Definition at line 150 of file RaceManager.hh.
|
staticprivate0x809BD730 |
Definition at line 152 of file RaceManager.hh.
|
staticconstexprprivate |
Definition at line 149 of file RaceManager.hh.