-
Notifications
You must be signed in to change notification settings - Fork 0
/
Block.h
36 lines (34 loc) · 891 Bytes
/
Block.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
#pragma once
#include "SpriteSheet.h"
#include "texturemapmanager.h"
#define SILVER_HEALTH 3
class BlockC : public ObjectC
{
public:
enum Color {
};
BlockC(int id, float width, float height, float startX, float startY, TextureMapEnum textMapEnum);
~BlockC();
void setType(TextureMapEnum textMapEnum);
void setBlockColor(long color) {mBlockColor = color;};
long getBlockColor() {return mBlockColor;};
void update(DWORD milliseconds);
virtual void render();
void disable();
void enable() {mEnabled = true;};
float getWidth() { return mWidth; };
float getHeight() { return mHeight; };
bool isEnabled();
void setRandomColor();
bool applyDamage();
bool getInvincible() { return invincible; }
private:
long mBlockColor;
bool mEnabled;
float mWidth;
float mHeight;
bool mHealth;
int curHealth;
bool invincible;
SpriteSheetC mBlockSprite;
};