-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathModuleUI.h
46 lines (39 loc) · 817 Bytes
/
ModuleUI.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
#ifndef __ModuleUI_H__
#define __ModuleUI_H__
#include "Module.h"
#include "Animation.h"
#include <ctime>
#include <vector>
struct SDL_Texture;
enum UIState
{
UIInit,
UIPlay,
UIFinish,
UIGameOver
};
class ModuleUI : public Module
{
public:
ModuleUI(bool active = true);
~ModuleUI();
bool Start();
update_status Update();
bool CleanUp();
public:
SDL_Texture* layout = nullptr;
SDL_Texture* turbo = nullptr;
SDL_Texture* spritesUI = nullptr;
clock_t tick_timer;
int score, gear;
float speed, maxSpeed, turboIndex;
float totalTime, time, timeLeft, lapTime, checkpointTimer, finishTimer, lastLapTime;
float bonusTime, bonusTimeSub;
bool checkpoint, savedTime;
UIState uiState;
vector<SDL_Rect> turboRect;
SDL_Rect gameoverUI;
SDL_Rect endUI;
Animation extendPlay;
};
#endif // __MODULEUI_H__