-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWinningDecoration.h
60 lines (48 loc) · 1.23 KB
/
WinningDecoration.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
#pragma once
#include <random>
#include "Drawable.h"
#include "GameEntity.h"
enum DecorationType {
PODIUM,
BALLOON,
};
class WinningDecoration : public Drawable, public GameEntity
{
public:
WinningDecoration(DecorationType type, glm::vec3 podiumPosition, std::default_random_engine* generator);
~WinningDecoration();
void RegenBalloonProperties();
// Drawable
ModelEnum GetModelEnum() override;
AniMode GetAniMode() override;
glm::mat4 GetParentTransform() override;
// GameEntity
void FixedUpdate() override;
// Information
glm::vec3 GetPosition() const;
void SetPosition(glm::vec3 position);
glm::mat4 GetRotation() const;
void SetRotation(glm::mat4 rotation);
void SetHeight(float height);
float GetHeight();
float upVelocity = 0;
float currHeight = 0;
float maxHeight = 30;
private:
// Transformations
glm::vec2* translate = nullptr;
glm::vec3* translate3D = nullptr;
glm::mat4 rotation{};
glm::mat4 hold_transformation_{};
// Current model to display
ModelEnum model;
AniMode modelAnim;
DecorationType decType;
// Get matrix transformation
glm::mat4 GetTransformation();
glm::mat4 GetTranslation();
float pickupHeight = -1;
float dropHeight = -3;
glm::vec3 podiumPos;
std::default_random_engine* generator;
};