]> git.lizzy.rs Git - dragonblocks-bedrock.git/blob - src/entity.h
Some structure Changes
[dragonblocks-bedrock.git] / src / entity.h
1 #ifndef _ENTITY_H_
2 #define _ENTITY_H_
3 #include <string>
4 #include "texture.h"
5 #include "util.h"
6 #define MAX_ENTITIES 16
7 #define GRAVITY 9.81
8 class Entity{
9         public:
10                 std::string name;
11                 Texture *texture;
12                 double width;
13                 double height;
14                 double x;
15                 double y;
16                 double tx0;
17                 double vx;
18                 double x0;
19                 double ax;
20                 double ty0;
21                 double vy;
22                 double y0;
23                 double ay;
24                 void physics();
25                 void physics_reset_x();
26                 void physics_reset_y();
27                 bool physics_check_x();
28                 bool physics_check_y();
29                 bool physics_check_both();
30                 void spawn(double, double, bool);
31                 Entity();
32                 static Entity *list[MAX_ENTITIES];
33                 static int count;
34                 static double t;
35                 static void physics_all();
36 };
37 #endif