HoverRace
2.0
|
#include <MainCharacter.h>
Classes | |
class | Cylinder |
Public Types | |
enum | : unsigned int { eMotorOn = 1, eRight = 2, eLeft = 4, eStraffleRight = 8, eLookBack = 8, eStraffleLeft = 16, eBreakDirection = 32, eJump = 64, eFire = 128, eSlowRotation = 1024, eSelectWeapon = 2048 } |
using | checkpointSignal_t = boost::signals2::signal< void(MainCharacter *, int)> |
enum | eWeapon { eMissile, eMine, ePowerUp, eNotAWeapon } |
using | finishedSignal_t = boost::signals2::signal< void(MainCharacter *)> |
using | finishLineSignal_t = boost::signals2::signal< void(MainCharacter *)> |
using | startedSignal_t = boost::signals2::signal< void(MainCharacter *)> |
Public Member Functions | |
virtual | ~MainCharacter () |
void | AddRenderer () override |
void | Finish () |
Signal that the player's session has ended. More... | |
double | GetAbsoluteSpeed () const |
MR_Angle | GetCabinOrientation () const |
checkpointSignal_t & | GetCheckpointSignal () |
eWeapon | GetCurrentWeapon () const |
double | GetDirectionalSpeed () const |
finishedSignal_t & | GetFinishedSignal () |
finishLineSignal_t & | GetFinishLineSignal () |
double | GetFuelLevel () const |
Retrieve the relative amount of fuel remaining. More... | |
int | GetHitQueue () |
int | GetHoverId () const |
unsigned int | GetHoverModel () const |
MR_SimulationTime | GetLastLapCompletion () const |
MR_SimulationTime | GetLastLapDuration () const |
int | GetMineCount () const |
int | GetMissileRefillLevel (int pNbLevel) const |
Model::ElementNetState | GetNetState () const override |
int | GetPlayerIndex () const |
int | GetPowerUpCount () const |
int | GetPowerUpFraction (int pNbLevel) const |
startedSignal_t & | GetStartedSignal () |
MR_SimulationTime | GetTotalTime () const |
bool | HasFinish () const |
Determine if the player's session has ended. More... | |
bool | HasStarted () const |
Determine if the player has started playing (pregame is over and the player has control of the craft). More... | |
int | HitQueueCount () const |
void | PlayExternalSounds (int pDB, int pPan) override |
void | PlayInternalSounds () override |
void | Render (VideoServices::Viewport3D *pDest, MR_SimulationTime pTime) override |
void | SetAsMaster () |
void | SetAsSlave () |
void | SetBrakeState (bool brakeState) |
void | SetChangeItem () |
void | SetEngineState (bool engineState) |
void | SetHoverId (int pId) |
void | SetHoverModel (unsigned int pModel) |
void | SetJump () |
void | SetLookBackState (bool lookBackState) |
void | SetNetState (int pDataLen, const MR_UInt8 *pData) override |
void | SetOrientation (MR_Angle pOrientation) |
void | SetPowerup () |
void | SetSimulationTime (MR_SimulationTime pTime) |
void | SetTurnLeftState (bool leftState) |
void | SetTurnRightState (bool rightState) |
![]() | |
FreeElement (const Util::ObjectFromFactoryId &id={0, 0}) | |
virtual | ~FreeElement () |
virtual bool | AssignPermNumber (int pNumber) |
Assign a permanent hook number. More... | |
virtual void | SetOwnerId (int pOwnerId) |
![]() | |
Element (const Util::ObjectFromFactoryId &id) | |
virtual | ~Element () |
void | ApplyEffects (const ContactEffectList *pList, MR_SimulationTime pTime, MR_SimulationTime pDuration, BOOL pValidDirection, MR_Angle pHorizontalDirection, MR_Int32 pZMin, MR_Int32 pZMax, Track &track) |
void | Serialize (Parcel::ObjStream &) overridefinal |
![]() | |
ObjectFromFactory (const ObjectFromFactoryId &pId) noexcept | |
virtual | ~ObjectFromFactory () |
const ObjectFromFactoryId & | GetTypeId () const noexcept |
Static Public Member Functions | |
static MainCharacter * | New (int idx, char pGameOpts) |
Create a new player. More... | |
![]() | |
template<class T > | |
static void | SerializeShared (Parcel::ObjStream &archive, typename std::enable_if< std::is_base_of< ObjectFromFactory, T >::value, std::shared_ptr< T >>::type &obj) |
Serialize a shared pointer to a serializable object. More... | |
Public Attributes | |
MR_SimulationTime | mLastCollisionTime |
BOOL | mNetPriority |
int | mRoom |
![]() | |
MR_Angle | mOrientation |
MR_3DCoordinate | mPosition |
Protected Member Functions | |
void | ApplyEffect (const Model::ContactEffect *pEffect, MR_SimulationTime pTime, MR_SimulationTime pDuration, BOOL pValidDirection, MR_Angle pHorizontalDirection, MR_Int32 pZMin, MR_Int32 pZMax, Model::Track &track) override |
const Model::ContactEffectList * | GetEffectList () override |
const Model::ShapeInterface * | GetGivingContactEffectShape () override |
Get the shape that gives an effect when touching while moving. More... | |
const Model::ShapeInterface * | GetObstacleShape () override |
Get the shape that stops other elements' movement. More... | |
const Model::ShapeInterface * | GetReceivingContactEffectShape () override |
Get the shape that gives an effect when touched by a moving element. More... | |
int | Simulate (MR_SimulationTime pDuration, Model::Track &track, int pRoom) override |
Advance the simulation. More... | |
Private Member Functions | |
MainCharacter () | |
int | InternalSimulate (MR_SimulationTime pDuration, Model::Track &track, int pRoom) |
using HoverRace::MainCharacter::MainCharacter::checkpointSignal_t = boost::signals2::signal<void(MainCharacter*, int)> |
using HoverRace::MainCharacter::MainCharacter::finishedSignal_t = boost::signals2::signal<void(MainCharacter*)> |
using HoverRace::MainCharacter::MainCharacter::finishLineSignal_t = boost::signals2::signal<void(MainCharacter*)> |
using HoverRace::MainCharacter::MainCharacter::startedSignal_t = boost::signals2::signal<void(MainCharacter*)> |
anonymous enum : unsigned int |
|
private |
|
virtual |
|
overridevirtual |
Reimplemented from HoverRace::Model::Element.
|
overrideprotectedvirtual |
Reimplemented from HoverRace::Model::Element.
void HoverRace::MainCharacter::MainCharacter::Finish | ( | ) |
Signal that the player's session has ended.
double HoverRace::MainCharacter::MainCharacter::GetAbsoluteSpeed | ( | ) | const |
MR_Angle HoverRace::MainCharacter::MainCharacter::GetCabinOrientation | ( | ) | const |
|
inline |
MainCharacter::eWeapon HoverRace::MainCharacter::MainCharacter::GetCurrentWeapon | ( | ) | const |
double HoverRace::MainCharacter::MainCharacter::GetDirectionalSpeed | ( | ) | const |
|
overrideprotectedvirtual |
Reimplemented from HoverRace::Model::Element.
|
inline |
|
inline |
double HoverRace::MainCharacter::MainCharacter::GetFuelLevel | ( | ) | const |
Retrieve the relative amount of fuel remaining.
|
overrideprotectedvirtual |
Get the shape that gives an effect when touching while moving.
nullptr
if none. Reimplemented from HoverRace::Model::FreeElement.
int HoverRace::MainCharacter::MainCharacter::GetHitQueue | ( | ) |
int HoverRace::MainCharacter::MainCharacter::GetHoverId | ( | ) | const |
unsigned int HoverRace::MainCharacter::MainCharacter::GetHoverModel | ( | ) | const |
MR_SimulationTime HoverRace::MainCharacter::MainCharacter::GetLastLapCompletion | ( | ) | const |
MR_SimulationTime HoverRace::MainCharacter::MainCharacter::GetLastLapDuration | ( | ) | const |
int HoverRace::MainCharacter::MainCharacter::GetMineCount | ( | ) | const |
int HoverRace::MainCharacter::MainCharacter::GetMissileRefillLevel | ( | int | pNbLevel | ) | const |
|
overridevirtual |
Reimplemented from HoverRace::Model::FreeElement.
|
overrideprotectedvirtual |
Get the shape that stops other elements' movement.
nullptr
if none. Reimplemented from HoverRace::Model::FreeElement.
|
inline |
int HoverRace::MainCharacter::MainCharacter::GetPowerUpCount | ( | ) | const |
int HoverRace::MainCharacter::MainCharacter::GetPowerUpFraction | ( | int | pNbLevel | ) | const |
|
overrideprotectedvirtual |
Get the shape that gives an effect when touched by a moving element.
nullptr
if none. Reimplemented from HoverRace::Model::FreeElement.
|
inline |
MR_SimulationTime HoverRace::MainCharacter::MainCharacter::GetTotalTime | ( | ) | const |
bool HoverRace::MainCharacter::MainCharacter::HasFinish | ( | ) | const |
Determine if the player's session has ended.
true
if the session is over, false
if the player is still playing. bool HoverRace::MainCharacter::MainCharacter::HasStarted | ( | ) | const |
Determine if the player has started playing (pregame is over and the player has control of the craft).
true
if the play session has started, false
if still in pregame. int HoverRace::MainCharacter::MainCharacter::HitQueueCount | ( | ) | const |
|
private |
|
static |
Create a new player.
idx | The player index (starting at 0 for player 1). |
gameopts | The game options. |
|
overridevirtual |
Reimplemented from HoverRace::Model::FreeElement.
|
overridevirtual |
Reimplemented from HoverRace::Model::FreeElement.
|
overridevirtual |
Reimplemented from HoverRace::Model::FreeElement.
void HoverRace::MainCharacter::MainCharacter::SetAsMaster | ( | ) |
void HoverRace::MainCharacter::MainCharacter::SetAsSlave | ( | ) |
void HoverRace::MainCharacter::MainCharacter::SetBrakeState | ( | bool | brakeState | ) |
void HoverRace::MainCharacter::MainCharacter::SetChangeItem | ( | ) |
void HoverRace::MainCharacter::MainCharacter::SetEngineState | ( | bool | engineState | ) |
void HoverRace::MainCharacter::MainCharacter::SetHoverId | ( | int | pId | ) |
void HoverRace::MainCharacter::MainCharacter::SetHoverModel | ( | unsigned int | pModel | ) |
void HoverRace::MainCharacter::MainCharacter::SetJump | ( | ) |
void HoverRace::MainCharacter::MainCharacter::SetLookBackState | ( | bool | lookBackState | ) |
|
overridevirtual |
Reimplemented from HoverRace::Model::FreeElement.
void HoverRace::MainCharacter::MainCharacter::SetOrientation | ( | MR_Angle | pOrientation | ) |
void HoverRace::MainCharacter::MainCharacter::SetPowerup | ( | ) |
void HoverRace::MainCharacter::MainCharacter::SetSimulationTime | ( | MR_SimulationTime | pTime | ) |
void HoverRace::MainCharacter::MainCharacter::SetTurnLeftState | ( | bool | leftState | ) |
void HoverRace::MainCharacter::MainCharacter::SetTurnRightState | ( | bool | rightState | ) |
|
overrideprotectedvirtual |
Advance the simulation.
pTimeSlice | The time slice to simulate over. |
track | The track. |
pRoom | The room number. |
Reimplemented from HoverRace::Model::FreeElement.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
MR_SimulationTime HoverRace::MainCharacter::MainCharacter::mLastCollisionTime |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
BOOL HoverRace::MainCharacter::MainCharacter::mNetPriority |
|
private |
|
private |
|
private |
|
private |
|
private |
int HoverRace::MainCharacter::MainCharacter::mRoom |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |