#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 25 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 |
Random & | random () |
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 93 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 118 of file RaceManager.hh.
|
0x80532F88 |
Definition at line 14 of file RaceManager.cc.
|
inlinestaticnodiscard |
Definition at line 146 of file RaceManager.hh.
|
inlinenodiscard0x80536230 |
Definition at line 109 of file RaceManager.hh.
|
nodiscard0x8053621C |
Definition at line 70 of file RaceManager.cc.
|
inlinenodiscard |
Definition at line 126 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 122 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 134 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 138 of file RaceManager.hh.
|
inlinenodiscard |
Definition at line 130 of file RaceManager.hh.
|
private |
Definition at line 158 of file RaceManager.hh.
|
private |
Definition at line 155 of file RaceManager.hh.
|
private |
Definition at line 154 of file RaceManager.hh.
|
private |
Definition at line 157 of file RaceManager.hh.
|
private |
Definition at line 159 of file RaceManager.hh.
|
private |
Definition at line 156 of file RaceManager.hh.
|
staticconstexprprivate |
Definition at line 162 of file RaceManager.hh.
|
staticprivate0x809BD730 |
Definition at line 164 of file RaceManager.hh.
|
staticconstexprprivate |
Definition at line 161 of file RaceManager.hh.