| 
    PCG-FPS
    v2 m0.22.4
    
   Simple First Person Shooter with Procedurally Generated Level 
   | 
 
 
 
 
Go to the documentation of this file.    1 #ifndef SKR_FPS2_GAME_H 
    2 #define SKR_FPS2_GAME_H 
   10 #include "pcg/Target.h" 
   11 #include "..\Renderer\OpenGL\TargetGeometry.h" 
   81         void Hit(uint32_t 
id);
 
  121 #endif // !SKR_FPS2_GAME_H 
 
bool _complete
flag inidication if game is completed
Definition: Game.h:54
 
uint32_t _targetId
id of target
Definition: Game.h:24
 
void Reset()
resets game clears targets and resets all flags and stats to initial values
Definition: Game.cpp:107
 
bool IsComplete()
returns value inidcating if all targets are not or not
Definition: Game.cpp:124
 
void ResetStats()
resets stats
Definition: Game.cpp:117
 
std::chrono::system_clock::time_point _startTime
recoreded time of player crossing the start line
Definition: Game.h:55
 
bool _finished
flat inidicating if finish is reached
Definition: Game.h:53
 
uint32_t NumberOfCompeltedTargets()
returns number of completed targets
Definition: Game.cpp:21
 
bool _started
flag inidacting if game ist startet
Definition: Game.h:52
 
Game()
default constructor resets stats
Definition: Game.h:41
 
bool IsRunning()
returns a value indicating if game is running
Definition: Game.cpp:178
 
std::string GetStats()
gets current stats in human readable form
Definition: Game.cpp:129
 
uint32_t _numberOfShots
number of shots fired by the plaer
Definition: Game.h:69
 
Completed(uint32_t id)
constructor
Definition: Game.cpp:15
 
uint32_t _numberOfHits
number of hits registered
Definition: Game.h:70
 
Game operator=(const Game &)=delete
copy assignment operator is deleted
 
static Game & GetInstance()
gets only instance of Game manager Implements Scott Meyer's singleton pattern
Definition: Game.cpp:34
 
bool IsFinished()
returns value inidicating if game is finished
Definition: Game.cpp:168
 
std::vector< Completed > _targets
list of target ids and completion status
Definition: Game.h:68
 
Definition: AssetPath.h:10
 
void Shot()
called if a shot is fired (LMB press)
Definition: Game.cpp:45
 
holds target completion
Definition: Game.h:22
 
Main Game Manager class keeps track of status of game (started, finished, completed) and stats (numbe...
Definition: Game.h:37
 
void AddTarget(uint32_t target)
adds target of given id to list of targets
Definition: Game.cpp:40
 
bool _completed
true if compelted, otherwise false
Definition: Game.h:25
 
void Hit(uint32_t id)
called if a hit is registered
Definition: Game.cpp:50
 
bool IsStarted()
returns a value indcating if game has started
Definition: Game.cpp:173
 
void Start()
called if game is startet: player crosses the start line
Definition: Game.cpp:152
 
std::chrono::system_clock::time_point _finishTime
recoreded time of player reaching the finish box
Definition: Game.h:56
 
Game(const Game &)=delete
copy constructor is deleted
 
void Finish()
called if game finished: player reaches the finish box
Definition: Game.cpp:160