From 98ba22e7064db57316dfff1ae127feb3dceeb73e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Thu, 31 Jul 2014 13:58:22 +0200 Subject: Initial commit --- docs/html/class_car.html | 302 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 302 insertions(+) create mode 100644 docs/html/class_car.html (limited to 'docs/html/class_car.html') diff --git a/docs/html/class_car.html b/docs/html/class_car.html new file mode 100644 index 0000000..0e1a88d --- /dev/null +++ b/docs/html/class_car.html @@ -0,0 +1,302 @@ + + + + +Rally X: Car Class Reference + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+
Rally X + +
+
ELEN3009 Project by Justin Wernick and David Schneider
+
+
+ + + + + +
+
+ +
+
Car Class Reference
+
+
+ +

GameObject that moves through the maze and changes direction. + More...

+ +

#include <Car.h>

+
+Inheritance diagram for Car:
+
+
+ + +GameObject +EnemyCar +PlayerCar + +
+ +

List of all members.

+ + + + + + + + + + + + + + + +

+Public Member Functions

 Car (double x, double y, BitmapStore::Image image, Maze::Direction facing)
 Creates a Car at the given position, with the given image, facing in the given direction.
double speed () const
 Function to access the current speed of the car.

+Protected Member Functions

void move (const Maze &maze)
 Moves the car by its current speed in the direction of its facing.

+Protected Attributes

double _speed
 The current speed that the Car is moving at.

+Static Protected Attributes

static const double _baseSpeed = 0.1
 The speed that a Car moves at in normal conditions.
+

Detailed Description

+

GameObject that moves through the maze and changes direction.

+

Should not be instantiated directly, but rather instantiated through one of the subclasses, PlayerCar or EnemyCar.

+
Author:
Justin Wernick
+
+David Schneider
+ +

Definition at line 20 of file Car.h.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Car::Car (double x,
double y,
BitmapStore::Image image,
Maze::Direction facing 
)
+
+
+ +

Creates a Car at the given position, with the given image, facing in the given direction.

+
Parameters:
+ + + + + +
[in]xx coordinate of initial position.
[in]yy coordinate of initial position.
[in]imageBitmap to be drawn on the screen to represent the car.
[in]facingDirection in which the Car is initially facing.
+
+
+ +

Definition at line 3 of file Car.cpp.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void Car::move (const Mazemaze) [protected]
+
+
+ +

Moves the car by its current speed in the direction of its facing.

+

Only moves along the x or y axis, and snaps to the grid in the other direction. Does not allow movement through solid parts of the maze.

+
Parameters:
+ + +
[in]mazeThe maze in which the Car is moving, confining its movements.
+
+
+ +

Definition at line 14 of file Car.cpp.

+ +
+
+ +
+
+ + + + + + + +
double Car::speed () const
+
+
+ +

Function to access the current speed of the car.

+
Returns:
The current speed of the car, in pixels per update.
+ +

Definition at line 9 of file Car.cpp.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
const double Car::_baseSpeed = 0.1 [static, protected]
+
+
+ +

The speed that a Car moves at in normal conditions.

+ +

Definition at line 54 of file Car.h.

+ +
+
+ +
+
+ + + + +
double Car::_speed [protected]
+
+
+ +

The current speed that the Car is moving at.

+ +

Definition at line 53 of file Car.h.

+ +
+
+
The documentation for this class was generated from the following files: +
+ +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator
+ + +
+ +
+ + + + + + + -- cgit v1.2.3