The class that manages the game time.
More...
#include <TimeManager.hpp>
|
sf::Clock | _clock |
| The clock for getting the current time. More...
|
|
sf::Time | T |
| The Game time. More...
|
|
sf::Time | tempTime |
| The temporary object used for storing time while paused, goal scored or during half time. More...
|
|
std::stringstream | ss |
| The string stream used for returning the game time as a string. More...
|
|
int | t |
|
int | vt |
|
int | s |
|
int | m |
|
The class that manages the game time.
◆ TimeManager()
HeadBall::TimeManager::TimeManager |
( |
| ) |
|
Construct a new Time Manager object.
◆ ~TimeManager()
HeadBall::TimeManager::~TimeManager |
( |
| ) |
|
|
inline |
Destroy the Time Manager object.
◆ displayTimer()
std::string HeadBall::TimeManager::displayTimer |
( |
| ) |
|
Return the game time as a string that can simply be displayed.
- Returns
- std::string The game time as a sttring
◆ getTime()
int HeadBall::TimeManager::getTime |
( |
| ) |
|
Get the time in minutes as an integer.
- Returns
- int The game time in minutes
◆ pause()
void HeadBall::TimeManager::pause |
( |
| ) |
|
◆ processTime()
void HeadBall::TimeManager::processTime |
( |
| ) |
|
Process the time in the game.
◆ resetTimer()
void HeadBall::TimeManager::resetTimer |
( |
| ) |
|
◆ resume()
void HeadBall::TimeManager::resume |
( |
| ) |
|
◆ setTime()
void HeadBall::TimeManager::setTime |
( |
sf::Time |
timer | ) |
|
Set the Time.
- Parameters
-
timer | The time as sf::Time |
◆ zero()
void HeadBall::TimeManager::zero |
( |
| ) |
|
◆ _clock
sf::Clock HeadBall::TimeManager::_clock |
|
private |
The clock for getting the current time.
int HeadBall::TimeManager::m |
|
private |
int HeadBall::TimeManager::s |
|
private |
◆ ss
std::stringstream HeadBall::TimeManager::ss |
|
private |
The string stream used for returning the game time as a string.
sf::Time HeadBall::TimeManager::T |
|
private |
int HeadBall::TimeManager::t |
|
private |
◆ tempTime
sf::Time HeadBall::TimeManager::tempTime |
|
private |
The temporary object used for storing time while paused, goal scored or during half time.
◆ vt
int HeadBall::TimeManager::vt |
|
private |
The documentation for this class was generated from the following files: