blob: 101fc7a9a199634b1cf0f8c330ed298ea9661845 (
plain)
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
|
#ifndef ENTITIES_H
#define ENTITIES_H
#include <common.h>
class Entity{
public:
void *inWorld;
float width;
float height;
float speed;
int type, subtype;
vec2 loc;
vec2 vel;
bool right,left, canMove;
bool alive;
unsigned char ground;
unsigned int texture[];
void spawn(float, float);
void draw(void);
void wander(int, vec2*);
virtual void interact(){}
private:
int ticksToUse;
};
class Player : public Entity{
public:
Player();
void interact();
};
class NPC : public Entity{
public:
NPC();
void interact();
};
class Structures : public Entity{
public:
void *inside;
Structures();
unsigned int spawn(int, float, float);
};
#endif // ENTITIES_H
|