aboutsummaryrefslogtreecommitdiffstats
path: root/src/entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entity.c')
-rw-r--r--src/entity.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/entity.c b/src/entity.c
index 1548968..ef77e8f 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -12,7 +12,6 @@ BoundingBox entityBoxFromScale(float scale, float width, float height)
};
}
-// TODO: Entity creation system
Entity createEntity(EntityId id, Vector3 position)
{
Entity entity;
@@ -65,7 +64,6 @@ 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);
@@ -98,6 +96,12 @@ void updateEntity(Entity* entity, Game* game)
(Vector2){POND_SIZE * 2.5, POND_SIZE * 2.5}, BLUE);
break;
case SAMANTHA:
+ // silly tv static effect
+ game->assets.models[SAMANTHA_MODEL].materials[0]
+ .maps[MATERIAL_MAP_DIFFUSE].texture =
+ game->assets.textures[
+ SAMANTHA_1_TEXTURE + ((int)(GetTime() * SAMANTHA_STATIC_SPEED) % 4)];
+
DrawModel(game->assets.models[SAMANTHA_MODEL], entity->position, 1.0,
WHITE);
break;