summaryrefslogtreecommitdiff
path: root/src/entity.h
blob: cbde27a1f77c9f98a1dff106d2c9747f0171b2fe (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
#ifndef ENTITY_H_
#define ENTITY_H_

#include <raylib.h>
#define <stdint.h>

enum entity_type {
  Player_Entity
};

#define ENTITY_ACTIVE 1
#define ENTITY_PHYSICS_ENABLED (1 << 1)

struct entity {
  enum entity_type type;
  uint32_t entity_flags flags

  Vector2 position; //The position of the entity(roughly the center)
  Rectangle body;
};

void update_entity(struct entity* entity, float dt);
void draw_entity(const struct entity* entity);

#endif