the Game object where all of the functions of the game is stored.
More...
#include <Game.h>
|
| int | stage = 0 |
| |
| float | lockedZ = 0.0f |
| | the current cue stage More...
|
| |
| float | lockedX = 0.0f |
| | the z position to be used with input maths More...
|
| |
| std::vector< Bowl * > | redBowls |
| | the x position to be used with input maths More...
|
| |
| std::vector< Bowl * > | blueBowls |
| |
| std::vector< Ball * > | scoreDisplay |
| |
| Box * | cues [2] |
| |
| Ball * | cueHat [2] |
| |
| Jack * | jack |
| |
| PlayerName | currentTurn |
| |
| Ball * | hand |
| |
| Box * | ground |
| |
| Box * | endWall |
| |
| Box * | sideWall1 |
| |
| Box * | sideWall2 |
| |
| KinectInput * | kinectSensor |
| | kinect data More...
|
| |
| int | blueScore |
| | scores More...
|
| |
| int | redScore |
| |
| const cgg::Vec3 | redColour = { 1, 0, 0 } |
| | colours More...
|
| |
| const cgg::Vec3 | blueColour = { 0, 0, 1 } |
| |
| const cgg::Vec3 | yellowColour = { 1, 1, 0 } |
| |
| const cgg::Vec3 | greenColour = { 0, 1, 0 } |
| |
| const cgg::Vec3 | whiteColour = { 1, 1, 1 } |
| |
| const float | aimStage = 10.0f |
| | constants More...
|
| |
| const float | pullBackStage = 5.0f |
| |
| const float | throwStage = 10.0f |
| |
| const float | autoThrowTime = 10.0f |
| |
| const float | delayBeforeNextTurn = 10.0f |
| |
| const float | bowlRadius = 0.4 |
| |
| const float | jackRadius = 0.3 |
| |
| float | handOffset = -1.7f |
| | the offset between the ball in hand and the floor, initially the jack More...
|
| |
the Game object where all of the functions of the game is stored.
Definition at line 21 of file Game.h.
constructor
- Parameters
-
| bool | sitmode, if the Kinect sensor should look for sitting skeletons, if not its a standing skeleton |
| TrackingPoint | which hand the Kinect should track. |
| void Game::ballWallCollisionTests |
( |
Ball * |
, |
|
|
float |
|
|
) |
| |
|
private |
Runs the tests for the ball wall collisions
- Parameters
-
| Ball* | a pointer to the ball to test |
| float | the deltaTime |
| void Game::displayScore |
( |
| ) |
|
|
private |
Displays the score in the form of the score coloured balls on the side of the screen
The processes that needs to happen at end of the game
| char Game::getClosestBallType |
( |
| ) |
|
|
private |
Looks for the closest ball to the jack and returns its type as a R or B
- Returns
- char the type of the ball
Accessed in the load assets in main and loads the initial data for the game.
| void Game::playerTurnStart |
( |
| ) |
|
|
private |
The processes that needs to happen at the start of the turn
| int Game::randomNumber |
( |
int |
minimum, |
|
|
int |
maximum |
|
) |
| |
|
inlineprivate |
Generates a random number between 2 values
- Parameters
-
| int | the minimum value |
| int | the maximum value |
Definition at line 149 of file Game.h.
| void Game::render |
( |
gl::Primitives * |
| ) |
|
This is where all of the entities are rendered. This is accessed by the update function in main.
- Parameters
-
| gl::Primitives* | a pointer to the primitives |
| void Game::resetPositions |
( |
cgg::MayaCamera & |
g_camera | ) |
|
|
private |
Resets the positions of things such as the camera every turn
- Parameters
-
| cgg::MayaCamera | a refernce to the camera |
| void Game::update |
( |
float |
dt, |
|
|
cgg::MayaCamera & |
g_camera |
|
) |
| |
The update function that is accessed int the update function in main Updates all of the Game information
- Parameters
-
| float | the deltaTime |
| cgg::MayaCamera | a reference to the camera |
| const float Game::aimStage = 10.0f |
|
private |
constants
Definition at line 95 of file Game.h.
| const float Game::autoThrowTime = 10.0f |
|
private |
| std::vector<Bowl*> Game::blueBowls |
|
private |
| const cgg::Vec3 Game::blueColour = { 0, 0, 1 } |
|
private |
scores
Definition at line 84 of file Game.h.
| const float Game::bowlRadius = 0.4 |
|
private |
| const float Game::delayBeforeNextTurn = 10.0f |
|
private |
| const cgg::Vec3 Game::greenColour = { 0, 1, 0 } |
|
private |
| float Game::handOffset = -1.7f |
|
private |
the offset between the ball in hand and the floor, initially the jack
Definition at line 104 of file Game.h.
| const float Game::jackRadius = 0.3 |
|
private |
kinect data
Definition at line 81 of file Game.h.
| float Game::lockedX = 0.0f |
|
private |
the z position to be used with input maths
Definition at line 64 of file Game.h.
| float Game::lockedZ = 0.0f |
|
private |
the current cue stage
Definition at line 63 of file Game.h.
| const float Game::pullBackStage = 5.0f |
|
private |
| std::vector<Bowl*> Game::redBowls |
|
private |
the x position to be used with input maths
entities
Definition at line 67 of file Game.h.
| const cgg::Vec3 Game::redColour = { 1, 0, 0 } |
|
private |
colours
Definition at line 88 of file Game.h.
| std::vector<Ball*> Game::scoreDisplay |
|
private |
| const float Game::throwStage = 10.0f |
|
private |
| const cgg::Vec3 Game::whiteColour = { 1, 1, 1 } |
|
private |
| const cgg::Vec3 Game::yellowColour = { 1, 1, 0 } |
|
private |
The documentation for this class was generated from the following file: