A State that contains and runs the Demo.
More...
#include <CannonGame.h>
A State that contains and runs the Demo.
◆ CannonGame()
| CannonGame::CannonGame |
( |
StateManager * |
stateManager, |
|
|
SDL_Window * |
window |
|
) |
| |
Constructs the State object.
- Parameters
-
| stateManager | A pointer to the StateManager. |
| window | A pointer to the window in use. |
◆ ~CannonGame()
| CannonGame::~CannonGame |
( |
| ) |
|
Destructs the State object.
◆ draw()
| void CannonGame::draw |
( |
| ) |
|
|
virtual |
A function to draw the State to the screen.
Implements State.
◆ getNewTargetPos()
| Vec3 CannonGame::getNewTargetPos |
( |
| ) |
|
|
private |
A function to generate a new postion for the target.
◆ input()
| bool CannonGame::input |
( |
| ) |
|
|
virtual |
Handles the State input.
- Returns
- If false then quit the State.
Implements State.
◆ update()
| void CannonGame::update |
( |
| ) |
|
|
virtual |
◆ aimBalls
| std::shared_ptr<GameObject> CannonGame::aimBalls[20] |
|
private |
An array of shared pointers to the aiming balls.
◆ aimTimer
| Timer* CannonGame::aimTimer |
|
private |
A timer for the aim balls spawning.
◆ backgroundMusicID
| std::string CannonGame::backgroundMusicID |
|
private |
◆ ballScale
| Vec3 CannonGame::ballScale |
|
private |
◆ ballStartPos
| Vec3 CannonGame::ballStartPos |
|
private |
The initali ball vectors.
◆ cannon
A shared pointer to the cannon.
◆ cannonball
| std::shared_ptr<GameObject> CannonGame::cannonball |
|
private |
A shared pointer to the cannonball.
◆ cannonBallVel
| Vec3 CannonGame::cannonBallVel |
|
private |
◆ currentLastAimBallIndex
| unsigned int CannonGame::currentLastAimBallIndex |
|
private |
The index of the last aim ball.
◆ explosionSound
| std::string CannonGame::explosionSound |
|
private |
◆ fire
A bool for if the cannonball is in the air.
◆ gameHelp
| std::string CannonGame::gameHelp |
|
private |
◆ gameTimer
| Timer* CannonGame::gameTimer |
|
private |
◆ gameUI
| std::string CannonGame::gameUI |
|
private |
◆ initialLoop
| bool CannonGame::initialLoop |
|
private |
◆ missTimer
| Timer* CannonGame::missTimer |
|
private |
A timer for respawning the cannonball after a miss.
◆ moveSpeed
| float CannonGame::moveSpeed |
|
private |
◆ newAimBall
| bool CannonGame::newAimBall |
|
private |
A bool fo if a new ball should spawn.
◆ noBallSound
| std::string CannonGame::noBallSound |
|
private |
◆ pointSound
| std::string CannonGame::pointSound |
|
private |
◆ score
◆ scoreText
| Text* CannonGame::scoreText |
|
private |
◆ targetBox
A shared pointer to the target box.
◆ targetPole
| std::shared_ptr<GameObject> CannonGame::targetPole |
|
private |
A shared pointer to the target pole.
◆ targetPoleOffset
| Vec3 CannonGame::targetPoleOffset |
|
private |
The position offset of the target pole and target box.
◆ timeLeft
| float CannonGame::timeLeft |
|
private |
The time left in the game.
◆ timeText
| Text* CannonGame::timeText |
|
private |
◆ totalTime
| float CannonGame::totalTime |
|
private |
The documentation for this class was generated from the following files: