Rally X
ELEN3009 Project by Justin Wernick and David Schneider
Public Member Functions | Static Public Member Functions | Static Private Attributes
Checkpoint Class Reference

GameObject that the player needs to pick up by driving over. More...

#include <Checkpoint.h>

Inheritance diagram for Checkpoint:
GameObject

List of all members.

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.

Detailed Description

GameObject that the player needs to pick up by driving over.

The level is complete when all checkpoints have been collected.

Author:
Justin Wernick
David Schneider

Definition at line 15 of file Checkpoint.h.


Constructor & Destructor Documentation

Checkpoint::Checkpoint ( double  x,
double  y 
)

Creates a checkpoint at the given coordinates.

Parameters:
[in]xx coordinate of Checkpoint's position.
[in]yy 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.


Member Function Documentation

int Checkpoint::checkpointCount ( ) [static]

Function for accessing the number of checkpoints that currently exist.

Returns:
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.


Member Data Documentation

int Checkpoint::_checkpointCount = 0 [static, private]

Count of the number of Checkpoints currently in existence.

Definition at line 50 of file Checkpoint.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator