forked from RippeR37/BattleCity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Items.h
36 lines (29 loc) · 846 Bytes
/
Items.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
/**************************************************
Autor: Damian "RippeR" Dyñdo
URL: http://warsztat.gd/projects.php?x=view&id=2063
**************************************************/
#ifndef ITEMS_H_INCLUDED
#define ITEMS_H_INCLUDED
#include <list>
#include "Sprites.h"
#include "Types.h"
using namespace std;
struct Item {
int x, y;
double frame_duration;
bool is_visible, destroyed;
ITEM_TYPE type;
SpriteData sprite;
};
class CItems {
public:
CItems() { DestroyItem(); }
void CreateItem();
void DestroyItem() { m_current_item.destroyed = true; }
void Draw();
void Update(double dt);
Item GetCurrentItem() { return m_current_item; }
private:
Item m_current_item;
};
#endif // ITEMS_H_INCLUDED