-
Notifications
You must be signed in to change notification settings - Fork 0
/
Power.h
38 lines (27 loc) · 613 Bytes
/
Power.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
#ifndef __POWER_H__
#define __POWER_H__
#include "Object.h"
#include "EventCollision.h"
const int DEFAULT_POWER_COUNT = 300;
enum PowerUp {
NONE = 0,
SPEED,
SHIELD,
KILL,
RANGE,
SLOWENEMY,
};
class Power : public df::Object {
private:
PowerUp power; // type of power stored in this power up
public:
// default constructor
Power(PowerUp init_power, df::Position init_pos);
// return the PowerUp type
PowerUp getPowerUp() const;
// event handler
int eventHandler(df::Event *p_e);
// if collision event then go to this function
int eventCollision(const df::EventCollision *p_e);
};
#endif