-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitem.h
32 lines (24 loc) · 802 Bytes
/
item.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
#pragma once
#include "entity.h"
enum class ItemType {
HEAL, // heals for a portion of the player's health
STAMINA, // permanently increases the player's maximum health
STRENGTH, // permanently increases the amount of damage each of the player's shots does
AGILITY, // permanently increases the player's movement speed and jump height
DEXTERITY, // permanently increases the amount of shots the player can fire per second
COUNT // just as a count for the number of elements in this enum
};
class Item : public Entity {
public:
Item();
~Item();
void update(GLfloat delta) override;
void onCollision(Tag tag, Entity* other) override;
void init(glm::vec3 pos, ItemType type);
ItemType type;
private:
Transform* model;
float rotSpeed;
float timer;
bool shouldDestroy = false;
};