-
Notifications
You must be signed in to change notification settings - Fork 4
/
HUD.h
39 lines (33 loc) · 970 Bytes
/
HUD.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
// Ahmed S. Tolba 2015-2018
#pragma once
#include "UIScreen.h"
#include <vector>
class HUD : public UIScreen
{
public:
// (Lower draw order corresponds with further back)
HUD(class Game* game);
~HUD();
void Update(float deltaTime) override;
void Draw(class Shader* shader) override;
void AddTargetComponent(class TargetComponent* tc);
void RemoveTargetComponent(class TargetComponent* tc);
protected:
void UpdateCrosshair(float deltaTime);
void UpdateRadar(float deltaTime);
class Texture* mHealthBar;
class Texture* mRadar;
class Texture* mCrosshair;
class Texture* mCrosshairEnemy;
class Texture* mBlipTex;
class Texture* mRadarArrow;
// All the target components in the game
std::vector<class TargetComponent*> mTargetComps;
// 2D offsets of blips relative to radar
std::vector<Vector2> mBlips;
// Adjust range of radar and radius
float mRadarRange;
float mRadarRadius;
// Whether the crosshair targets an enemy
bool mTargetEnemy;
};