diff options
Diffstat (limited to 'src/entity.c')
-rw-r--r-- | src/entity.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/entity.c b/src/entity.c index 97af95e..f9f7989 100644 --- a/src/entity.c +++ b/src/entity.c @@ -40,6 +40,15 @@ Entity createEntity(EntityId id, Vector3 position) }; break; + case UTILITY_POLE: + entity.box = (BoundingBox){ + .min = (Vector3){-UTILITY_POLE_RADIUS, -UTILITY_POLE_HEIGHT, + -UTILITY_POLE_RADIUS}, + .max = (Vector3){UTILITY_POLE_RADIUS, UTILITY_POLE_HEIGHT, + UTILITY_POLE_RADIUS}, + }; + + break; default: break; } @@ -49,8 +58,11 @@ Entity createEntity(EntityId id, Vector3 position) return entity; } +// TODO: Mesh instance the utility poles and make a 3d model void updateEntity(Entity* entity, Game* game) { + DrawBoundingBox(entity->box, RED); + switch (entity->id) { case OLD_MINT: @@ -78,6 +90,12 @@ void updateEntity(Entity* entity, Game* game) Vector3Add(entity->position, (Vector3){0.0, POND_HEIGHT * 2.0, 0.0}), (Vector2){POND_SIZE * 2.5, POND_SIZE * 2.5}, BLUE); break; + case UTILITY_POLE: + DrawCylinder(Vector3Subtract(entity->position, + (Vector3){0.0, UTILITY_POLE_HEIGHT}), + UTILITY_POLE_RADIUS, UTILITY_POLE_RADIUS, + UTILITY_POLE_HEIGHT * 2.0, 6, BROWN); + break; default: break; } |