blob: 0fe6366042e2d0a89ad967864a1552a22cc129e2 (
plain) (
blame)
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
|
#include "entity.h"
#include "game.h"
// TODO: Entity creation system
Entity createEntity(EntityId id, Vector3 position)
{
Entity entity;
entity.id = id;
entity.position = position;
// Test boundingbox.
entity.box.min = Vector3SubtractValue(position, 1.0);
entity.box.max = Vector3AddValue(position, 1.0);
return entity;
}
void updateEntity(Entity* entity, Game* game)
{
switch (entity->id)
{
case OLD_MINT:
DrawBillboard(game->player.camera, game->assets.textures[MINT_TEXTURE],
entity->position, 1.0, WHITE);
break;
case STICKY_NICKEL:
DrawBillboard(game->player.camera, game->assets.textures[NICK_TEXTURE],
entity->position, 1.0, WHITE);
break;
default:
break;
}
}
|