forked from jasonmaharjan/QuizmaHeros9000
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGameState3.hpp
45 lines (38 loc) · 872 Bytes
/
GameState3.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <SFML/Graphics.hpp>
#include <fstream>
#include "State.hpp"
#include "Games.hpp"
namespace Quizma
{
class GameState3 : public State
{
public:
GameState3(GameDataRef data);
void Init();
void HandleInput();
void Update(float dt);
void Draw(float dt);
std::size_t getCorrectAnswer();
private:
GameDataRef _data;
sf::Sprite _background;
sf::Sprite _questionBox;
sf::Sprite _optionsBox[4];
bool is_wrong_sprite_clicked = false;
sf::Sprite _cursor;
sf::Clock _clock;
std::stringstream ss;
sf::Text _numbers;
sf::Sprite _sound_icon;
sf::Sprite _pause_icon;
sf::Sprite _quit_icon;
sf::Clock _clock_prime3;
//for timer countdown
sf::Clock _clock3;
int _countdown = 30;
std::string _countdownString;
std::ostringstream _convert;
sf::Text _timerText;
};
}