Main Game Manager class keeps track of status of game (started, finished, completed) and stats (number of shots, hits, etc).  
 More...
#include <Game.h>
 | 
| void  | AddTarget (uint32_t target) | 
|   | adds target of given id to list of targets  More...
  | 
|   | 
| void  | Shot () | 
|   | called if a shot is fired (LMB press)  More...
  | 
|   | 
| void  | Hit (uint32_t id) | 
|   | called if a hit is registered  More...
  | 
|   | 
| void  | Reset () | 
|   | resets game clears targets and resets all flags and stats to initial values  More...
  | 
|   | 
| void  | ResetStats () | 
|   | resets stats  More...
  | 
|   | 
| bool  | IsComplete () | 
|   | returns value inidcating if all targets are not or not  More...
  | 
|   | 
| std::string  | GetStats () | 
|   | gets current stats in human readable form  More...
  | 
|   | 
| void  | Start () | 
|   | called if game is startet: player crosses the start line  More...
  | 
|   | 
| void  | Finish () | 
|   | called if game finished: player reaches the finish box  More...
  | 
|   | 
| bool  | IsFinished () | 
|   | returns value inidicating if game is finished  More...
  | 
|   | 
| bool  | IsStarted () | 
|   | returns a value indcating if game has started  More...
  | 
|   | 
| bool  | IsRunning () | 
|   | returns a value indicating if game is running  More...
  | 
|   | 
Main Game Manager class keeps track of status of game (started, finished, completed) and stats (number of shots, hits, etc). 
Implements Scott Meyers' singleton pattern. 
 
◆ Game() [1/2]
  
  
      
        
          | skr::fps2::Game::Game::Game  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineprivate   | 
  
 
default constructor resets stats 
 
 
◆ Game() [2/2]
  
  
      
        
          | skr::fps2::Game::Game::Game  | 
          ( | 
          const Game &  | 
           | ) | 
           | 
         
       
   | 
  
privatedelete   | 
  
 
copy constructor is deleted 
 
 
◆ AddTarget()
      
        
          | void skr::fps2::Game::Game::AddTarget  | 
          ( | 
          uint32_t  | 
          target | ) | 
           | 
        
      
 
adds target of given id to list of targets 
- Parameters
 - 
  
  
 
 
 
◆ Finish()
      
        
          | void skr::fps2::Game::Game::Finish  | 
          ( | 
           | ) | 
           | 
        
      
 
called if game finished: player reaches the finish box 
 
 
◆ GetInstance()
  
  
      
        
          | Game & skr::fps2::Game::Game::GetInstance  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
gets only instance of Game manager Implements Scott Meyer's singleton pattern 
- Returns
 - reference to only instance of this class 
 
 
 
◆ GetStats()
      
        
          | std::string skr::fps2::Game::Game::GetStats  | 
          ( | 
           | ) | 
           | 
        
      
 
gets current stats in human readable form 
- Returns
 - string of current stats in human readable form 
 
 
 
◆ Hit()
      
        
          | void skr::fps2::Game::Game::Hit  | 
          ( | 
          uint32_t  | 
          id | ) | 
           | 
        
      
 
called if a hit is registered 
- Parameters
 - 
  
  
 
 
 
◆ IsComplete()
      
        
          | bool skr::fps2::Game::Game::IsComplete  | 
          ( | 
           | ) | 
           | 
        
      
 
returns value inidcating if all targets are not or not 
- Returns
 - true if all targets are hit, otherwise false 
 
 
 
◆ IsFinished()
      
        
          | bool skr::fps2::Game::Game::IsFinished  | 
          ( | 
           | ) | 
           | 
        
      
 
returns value inidicating if game is finished 
- Returns
 - true if finished, otherwise false 
 
 
 
◆ IsRunning()
      
        
          | bool skr::fps2::Game::Game::IsRunning  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ IsStarted()
      
        
          | bool skr::fps2::Game::Game::IsStarted  | 
          ( | 
           | ) | 
           | 
        
      
 
returns a value indcating if game has started 
- Returns
 - true if game is started, otherwise false 
 
 
 
◆ NumberOfCompeltedTargets()
  
  
      
        
          | uint32_t skr::fps2::Game::Game::NumberOfCompeltedTargets  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
returns number of completed targets 
- Returns
 - number of completed targets 
 
 
 
◆ operator=()
  
  
      
        
          | Game skr::fps2::Game::Game::operator=  | 
          ( | 
          const Game &  | 
           | ) | 
           | 
         
       
   | 
  
privatedelete   | 
  
 
copy assignment operator is deleted 
 
 
◆ Reset()
      
        
          | void skr::fps2::Game::Game::Reset  | 
          ( | 
           | ) | 
           | 
        
      
 
resets game clears targets and resets all flags and stats to initial values 
 
 
◆ ResetStats()
      
        
          | void skr::fps2::Game::Game::ResetStats  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ Shot()
      
        
          | void skr::fps2::Game::Game::Shot  | 
          ( | 
           | ) | 
           | 
        
      
 
called if a shot is fired (LMB press) 
 
 
◆ Start()
      
        
          | void skr::fps2::Game::Game::Start  | 
          ( | 
           | ) | 
           | 
        
      
 
called if game is startet: player crosses the start line 
 
 
◆ _complete
  
  
      
        
          | bool skr::fps2::Game::Game::_complete | 
         
       
   | 
  
private   | 
  
 
flag inidication if game is completed 
 
 
◆ _finished
  
  
      
        
          | bool skr::fps2::Game::Game::_finished | 
         
       
   | 
  
private   | 
  
 
flat inidicating if finish is reached 
 
 
◆ _finishTime
  
  
      
        
          | std::chrono::system_clock::time_point skr::fps2::Game::Game::_finishTime | 
         
       
   | 
  
private   | 
  
 
recoreded time of player reaching the finish box 
 
 
◆ _numberOfHits
      
        
          | uint32_t skr::fps2::Game::Game::_numberOfHits | 
        
      
 
number of hits registered 
 
 
◆ _numberOfShots
      
        
          | uint32_t skr::fps2::Game::Game::_numberOfShots | 
        
      
 
number of shots fired by the plaer 
 
 
◆ _started
  
  
      
        
          | bool skr::fps2::Game::Game::_started | 
         
       
   | 
  
private   | 
  
 
flag inidacting if game ist startet 
 
 
◆ _startTime
  
  
      
        
          | std::chrono::system_clock::time_point skr::fps2::Game::Game::_startTime | 
         
       
   | 
  
private   | 
  
 
recoreded time of player crossing the start line 
 
 
◆ _targets
      
        
          | std::vector<Completed> skr::fps2::Game::Game::_targets | 
        
      
 
list of target ids and completion status 
 
 
The documentation for this class was generated from the following files: