Rally X
ELEN3009 Project by Justin Wernick and David Schneider
|
GameObject that the player needs to pick up by driving over. More...
#include <Checkpoint.h>
Public Member Functions | |
Checkpoint (double x, double y) | |
Creates a checkpoint at the given coordinates. | |
Checkpoint (const Checkpoint &ref) | |
Copy constuctor, overwritten to include in the counting of Checkpoints. | |
~Checkpoint () | |
Destructor, decreases the number of Checkpoints in existence. | |
void | collect () |
Function to be called when a PlayerCar collects the Checkpoint. | |
Static Public Member Functions | |
static int | checkpointCount () |
Function for accessing the number of checkpoints that currently exist. | |
Static Private Attributes | |
static int | _checkpointCount = 0 |
Count of the number of Checkpoints currently in existence. |
GameObject that the player needs to pick up by driving over.
The level is complete when all checkpoints have been collected.
Definition at line 15 of file Checkpoint.h.
Checkpoint::Checkpoint | ( | double | x, |
double | y | ||
) |
Creates a checkpoint at the given coordinates.
[in] | x | x coordinate of Checkpoint's position. |
[in] | y | y coordinate of Checkpoint's position. |
Definition at line 5 of file Checkpoint.cpp.
Checkpoint::Checkpoint | ( | const Checkpoint & | ref | ) |
Copy constuctor, overwritten to include in the counting of Checkpoints.
Definition at line 11 of file Checkpoint.cpp.
Checkpoint::~Checkpoint | ( | ) |
Destructor, decreases the number of Checkpoints in existence.
Definition at line 17 of file Checkpoint.cpp.
int Checkpoint::checkpointCount | ( | ) | [static] |
Function for accessing the number of checkpoints that currently exist.
Definition at line 22 of file Checkpoint.cpp.
void Checkpoint::collect | ( | ) |
Function to be called when a PlayerCar collects the Checkpoint.
Definition at line 27 of file Checkpoint.cpp.
int Checkpoint::_checkpointCount = 0 [static, private] |
Count of the number of Checkpoints currently in existence.
Definition at line 50 of file Checkpoint.h.