-
Notifications
You must be signed in to change notification settings - Fork 1
/
StateMenu.h
64 lines (47 loc) · 1.24 KB
/
StateMenu.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef _STATE_MENU_H_
#define _STATE_MENU_H_
#include <SFML/Graphics.hpp>
#include "State.h"
#include "GameEngine.h"
#include "Transition.h"
#include "CurrentLevel.h"
#include "Map.h"
#include "AndroidDemo.h"
#include "StatePlay.h"
#include <memory>
class StateMenu : public State
{
public:
StateMenu(GameDataRef p_data);
StateMenu(StateMenu&) = delete;
StateMenu& operator=(StateMenu&) = delete;
virtual ~StateMenu();
private:
GameDataRef m_data;
std::unique_ptr<Transition> m_fadeIn;
std::unique_ptr<Transition> m_fadeOut;
std::unique_ptr<CurrentLevel> m_currentLevel;
std::unique_ptr<Map> m_map;
std::vector<std::shared_ptr<AndroidDemo>> m_androids;
bool m_isStateOver{ false };
bool m_GotoDemo{ false };
sf::Text m_str_start;
sf::Text m_str_how_to1;
sf::Text m_str_how_to2;
sf::Text m_str_toggle_fullscreen;
sf::Text m_str_demo_countdown;
sf::Text m_str_credits1;
sf::Text m_str_credits2;
void SetTimer(int p_levelTimer);
void Timer(float dt);
float m_dtTotal{ 0 };
int m_demoTimer{ 15 };
void ToggleFullscren();
bool Fullscreen{ false };
private:
void Init();
void HandleInput();
void Update(float dt);
void Draw(float dt);
};
#endif // !_STATE_MENU_H_