-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuxiliaryVariables.cpp
More file actions
75 lines (56 loc) · 2.05 KB
/
Copy pathAuxiliaryVariables.cpp
File metadata and controls
75 lines (56 loc) · 2.05 KB
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
65
66
67
68
69
70
71
72
73
74
75
#include "Headers.h"
#include "AuxiliaryVariables.h"
//Constants
const unsigned Constants::WindowHeigth = 900;
const unsigned Constants::WindowWidth = 1400;
const float Constants::gridSizeF = 80.0f;
const unsigned Constants::gridSizeU = static_cast<unsigned>(Constants::gridSizeF);
const unsigned Constants::ValleyMapSizeX = 83;
const unsigned Constants::ValleyMapSizeY = 30;
const unsigned Constants::CaveMapSizeX = 30;
const unsigned Constants::CaveMapSizeY = 30;
const int Constants::spikeDamage = 15;
const int Constants::rifleDamage = 4;
const int Constants::batDamage = 5;
const int Constants::ninjaDamage = 10;
const int Constants::birdDamage = 3;
const int Constants::cometDamage = 7;
const int Constants::bigBatShockwaveDamage = 30;
const int Constants::batMaxHP = 20;
const int Constants::ninjaMaxHP = 30;
const int Constants::playerMaxHP = 50;
const int Constants::birdMaxHP = 15;
const int Constants::cometMaxHP = 30;
const float Constants::pi = 3.14;
const float Constants::playerSizeX = 50.0f;
const float Constants::playerSizeY = 58.0f;
const sf::Vector2f Constants::playerScale = { 1.3f, 1.3f };
const sf::Vector2f Constants::batScale = { 1.2f, 1.0f };
const sf::Vector2f Constants::ninjaScale = { 1.9f, 2.2f };
const sf::Vector2f Constants::birdScale = { 0.9f, 0.9f };
const sf::Vector2f Constants::cometScale = { 0.1f, 0.1f };
//Button realese detection
bool RealeseDetection::Escape = false;
bool RealeseDetection::mouseLeftButton = false;
bool RealeseDetection::W = false;
float deltaTime::timePerFrame = 0.0f;
bool RealeseDetection::escapeRealesed()
{
bool isEscapeRealesed{ RealeseDetection::Escape };
return isEscapeRealesed;
}
bool RealeseDetection::mouseRealesed()
{
bool isMouseLeftButtonRealesed{ RealeseDetection::mouseLeftButton };
return isMouseLeftButtonRealesed;
}
bool RealeseDetection::WRealesed()
{
bool isWRealesed{ RealeseDetection::W };
return isWRealesed;
}
int getRandomInt(int min, int max)
{
static std::mt19937 mt{ static_cast<std::mt19937::result_type>(std::time(nullptr)) };
return std::uniform_int_distribution<>{ min, max }(mt);
}