-
Notifications
You must be signed in to change notification settings - Fork 0
/
Powerup.h
37 lines (34 loc) · 912 Bytes
/
Powerup.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
#pragma once
#include "SpriteSheet.h"
class PowerupC : public ObjectC
{
public:
enum PowerupType {
SPEED_DOWN = 0,
CATCH,
EXPAND,
DISRUPTION,
LASER
};
PowerupC(int id, float width, float height, float startX, float startY, bool moveDown, bool forceDisrupt = false);
~PowerupC();
void setPowerupColor(long color) {mPowerupColor = color;};
long getPowerupColor() {return mPowerupColor;};
void update(DWORD milliseconds);
virtual void render();
void DoCollisions();
void disable() {mEnabled = false;};
void enable() {mEnabled = true;};
bool getEnabled() { return mEnabled; };
float getWidth() { return mWidth; };
float getHeight() { return mHeight; };
PowerupType getType() { return mPowerupType; }
private:
void CollideField();
long mPowerupColor;
bool mEnabled;
float mWidth;
float mHeight;
SpriteSheetC *mSpriteSheet;
PowerupType mPowerupType;
};