-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconstants.cpp
More file actions
121 lines (106 loc) · 2.9 KB
/
constants.cpp
File metadata and controls
121 lines (106 loc) · 2.9 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include <QString>
#include "constants.h"
const bool kDebugMode = false;
const int kFPS = 60;
const int kStartBalance = 10000;
namespace Scene {
const qreal kWidth = 1920;
const qreal kHeight = 1080;
const QRectF kRect{
-kWidth / 2,
-kHeight / 2,
kWidth,
kHeight};
const qreal kMapTextureZValue = -10000;
}
namespace UI {
const qreal kDefaultZValue = 10000;
const QColor kButtonDefaultTextColor = Qt::white;
}
namespace LevelData {
extern const int kLevelsCount = 1;
}
namespace Explosions {
const qreal kDefaultRadius = 70.0;
const Damage kDefaultDamage = Damage(50);
const Time kTimeBetweenFrames = 50_ms;
const qreal kZValue = 2000;
}
namespace Entities {
const int kCircleAttackAreaApproximationPointsCount = 10;
const Time kGrowingSpeed = Time(500);
const QString kSkeletonId = "Skeleton";
const QString kCobraId = "Cobra";
const QString kHedgehogId = "Hedgehog";
const QString kDwarfId = "Dwarf";
const int kCoinAppearChance = 3;
namespace MagicTower {
const qreal kAttackRangeLevel1 = 300;
const Time kAttackCooldownLevel1 = Time(4000);
const qreal kAttackRangeLevel2 = 400;
const Time kAttackCooldownLevel2 = Time(3000);
const qreal kAttackRangeLevel3 = 600;
const Time kAttackCooldownLevel3 = Time(2000);
const int kMaxLevel = 3;
const int kPrice = 110;
}
namespace CannonTower {
const qreal kAttackRangeLevel1 = 200;
const Time kAttackCooldownLevel1 = Time(1250);
const qreal kAttackRangeLevel2 = 300;
const Time kAttackCooldownLevel2 = Time(1000);
const qreal kAttackRangeLevel3 = 500;
const Time kAttackCooldownLevel3 = Time(1000);
const int kMaxLevel = 3;
const int kPrice = 70;
}
namespace Skeleton {
const Time kTimeBetweenFrames = 50_ms;
const qreal kSpeed = 50;
const int kHealth = 2000;
const int kDamageToBase = 1;
}
namespace Cobra {
const Time kTimeBetweenFrames = 50_ms;
const qreal kSpeed = 70;
const int kHealth = 160;
const int kDamageToBase = 1;
}
namespace Hedgehog {
const Time kTimeBetweenFrames = 50_ms;
const qreal kSpeed = 110;
const int kHealth = 80;
const int kDamageToBase = 1;
}
namespace Dwarf {
const Time kTimeBetweenFrames = 50_ms;
const qreal kSpeed = 80;
const int kHealth = 10000;
const int kDamageToBase = 1;
}
namespace MagicProjectile {
const Damage kDamageLevel1 = Damage(60);
const Damage kDamageLevel2 = Damage(100);
const Damage kDamageLevel3 = Damage(180);
const qreal kSpeed = 50;
const qreal kAcceleration = 1500;
const qreal kMaxSpeed = 300;
const qreal kEnemyFindDistance = 300;
const Time kTimeBetweenFrames = 50_ms;
}
namespace CannonProjectile {
const Damage kDamageLevel1 = Damage(10);
const Damage kDamageLevel2 = Damage(20);
const Damage kDamageLevel3 = Damage(40);
const qreal kSpeed = 500;
}
} // namespace Entities
namespace Costs {
const int kCoinCost = 50;
const int kCannonTowerCost = 200;
const int kMagicTowerCost = 300;
const int kTowerLevel2Upgrade = 100;
const int kTowerLevel3Upgrade = 150;
const int kBearTrapRepairingCost = 50;
const int kBombExplosionCost = 100;
}