-
Notifications
You must be signed in to change notification settings - Fork 0
/
TileMapResource.h
47 lines (33 loc) · 1008 Bytes
/
TileMapResource.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
39
40
41
42
43
44
45
46
47
#pragma once
#include "TileMapAnimationEx.h"
enum RESOURCE_TYPES
{
LIFES = 1,
AID = 2,
ARMOUR = 3
};
class Entity;
class TileMapResource: public TileMapAnimationEx
{
public:
TileMapResource();
TileMapResource(char *animation_name, char *particle_name, char *particle_used_name, hgeVector pos, short xw, short yw, short layer);
~TileMapResource();
inline void SetResourceType(int type) { resource_type = type; }
inline int GetResourceType() const { return resource_type; }
inline bool IsUsed() const { return used; }
inline void Used(bool used);
virtual void UpdateGraphic();
virtual void Render();
void MoveParticle(float x, float y, bool move);
virtual void Save(std::ofstream *file);
virtual void Load(std::ifstream *file);
const char* GetUsedPSName() { return used_name_ps.c_str(); }
protected:
int resource_type;
bool used;
float time;
float timer;
hgeParticleSystem *ps_used;
std::string used_name_ps;
};