-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGardenTool.h
56 lines (44 loc) · 1.31 KB
/
GardenTool.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
#pragma once
#include "ColliderCircle.h"
#include "Drawable.h"
#include "GameEntity.h"
#include "Holdable.h"
#include "Interactable.h"
#include "PhysicsObject.h"
#include "Player.h"
class GardenTool : public Interactable, public Holdable, public PhysicsObject, public GameEntity, public Drawable {
private:
ModelEnum model;
ColliderCircle* collider_;
// Transformations
glm::vec2* translate = nullptr;
glm::vec3* translate3D = nullptr;
glm::mat4 rotation{};
public:
AniMode modelAnim = NO_ANI;
GardenTool(ModelEnum curr);
~GardenTool();
void FixedUpdate() override;
// PhysicsObject
void OnCollide(PhysicsObject* object) override {};
void OnTrigger(PhysicsObject* object) override {};
std::vector<Collider*> GetColliders() override;
glm::vec2* GetWorldPosition() override;
// Drawable
glm::mat4 GetParentTransform() override;
ModelEnum GetModelEnum() override;
AniMode GetAniMode() override;
// Information
void SetModel(ModelEnum newModel, glm::vec3 pos);
glm::mat4 GetTransformation();
glm::mat4 GetTranslation();
glm::vec3 GetPosition() const;
void SetPosition(glm::vec3 position);
void SetRotation(glm::mat4 rotation);
glm::mat4 GetRotation() const;
bool isHeld = false;
Player* holding_player = nullptr;
// translation for player interact;
void SetHeight(float height);
float GetHeight();
};