NerfUS game coordinator for the Nerf gun firing range
Dependencies: HardwareInterface mbed-rtos mbed
Fork of NerfUS by
include/GameModes/PrecisionMode.hpp@18:469c8b2a9af9, 2017-03-27 (annotated)
- Committer:
- Ismael Balafrej
- Date:
- Mon Mar 27 11:15:50 2017 -0400
- Branch:
- PlayableGame
- Revision:
- 18:469c8b2a9af9
- Parent:
- 17:48474266a361
- Child:
- 19:33e8cd56630f
Fixed compiling error
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ismael Balafrej |
17:48474266a361 | 1 | #pragma once |
Ismael Balafrej |
17:48474266a361 | 2 | #include "PlayableGame.hpp" |
Ismael Balafrej |
17:48474266a361 | 3 | #include "Target.hpp" |
Ismael Balafrej |
18:469c8b2a9af9 | 4 | #include <cstddef> |
Ismael Balafrej |
17:48474266a361 | 5 | |
Ismael Balafrej |
17:48474266a361 | 6 | class PrecisionMode : PlayableGame |
Ismael Balafrej |
17:48474266a361 | 7 | { |
Ismael Balafrej |
17:48474266a361 | 8 | public: |
Ismael Balafrej |
17:48474266a361 | 9 | ~PrecisionMode(); |
Ismael Balafrej |
17:48474266a361 | 10 | |
Ismael Balafrej |
18:469c8b2a9af9 | 11 | TargetInfo * GetNextTarget(); |
Ismael Balafrej |
17:48474266a361 | 12 | void OnTargetHit(int timeTaken); |
Ismael Balafrej |
17:48474266a361 | 13 | void OnTargetMiss(); |
Ismael Balafrej |
17:48474266a361 | 14 | GameStats GetStats(); |
Ismael Balafrej |
17:48474266a361 | 15 | |
Ismael Balafrej |
17:48474266a361 | 16 | private: |
Ismael Balafrej |
17:48474266a361 | 17 | int currentTarget = 0; |
Ismael Balafrej |
17:48474266a361 | 18 | int numberOfRounds = 5; |
Ismael Balafrej |
17:48474266a361 | 19 | }; |