-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndicator.h
49 lines (37 loc) · 951 Bytes
/
Indicator.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
#pragma once
#include "GameEntity.h"
#include "Drawable.h"
class Indicator : public GameEntity, public Drawable {
public:
AniMode modelAnim = NO_ANI;
Indicator(VegetableType veggie);
~Indicator();
// GameEntity
void FixedUpdate() override;
// Drawable
glm::mat4 GetParentTransform() override;
ModelEnum GetModelEnum() override;
AniMode GetAniMode() override;
// Information
glm::vec3 GetPosition() const;
void SetPosition(glm::vec3 position);
void SetRotation(glm::mat4 rotation);
glm::mat4 GetRotation() const;
void SetWater();
void SetFertilize();
private:
// Transformations
glm::vec2* translate = nullptr;
glm::vec3* translate3D = nullptr;
glm::mat4 rotation{};
ModelEnum model;
// Get matrix transformation
glm::mat4 GetTransformation();
glm::mat4 GetTranslation();
VegetableType type;
float maxHeight = 4;
float minHeight = 3;
float currHeight = 3;
bool goingUp = false;
float heightIncrement = 0.01;
};