Update to use game_tileset.h

This commit is contained in:
2023-12-13 15:37:41 +01:00
parent 20aee8ffae
commit ce519fe409
14 changed files with 411 additions and 374 deletions

View File

@@ -67,6 +67,7 @@ void entityPathRemove(ecs_iter_t *it) {
}
void entitySetAnimationState(ecs_iter_t *it) {
/*
Animation *anim = ecs_field(it, Animation, 1);
AnimationType *animType = ecs_field(it, AnimationType , 2);
for (i32 i = 0; i < it->count; i++) {
@@ -76,6 +77,7 @@ void entitySetAnimationState(ecs_iter_t *it) {
anim[i].animType = type;
anim[i].sequence = getEntityAnimation(entityType, type);
}
*/
}
void entityUpdateSpatialID(ecs_iter_t *it) {
@@ -275,15 +277,18 @@ void entityUpdateAnimationState(ecs_iter_t *it) {
for (i32 i = 0; i < it->count; i++) {
f32 len = Vector2Length(velocity[i]);
/*
ecs_entity_t entity = it->entities[i];
AnimationType type = ANIM_IDLE;
if (len > 1.0f)
type = ANIM_WALK;
ecs_set(it->world, entity, AnimationType, {type});
*/
}
}
void entityUpdateAnimation(ecs_iter_t *it) {
/*
Game *game = ecs_singleton_get_mut(ECS, Game);
Animation *anim = ecs_field(it, Animation, 1);
TextureRegion *t = ecs_field(it, TextureRegion, 2);
@@ -301,6 +306,7 @@ void entityUpdateAnimation(ecs_iter_t *it) {
t[i].rec = bzTilesetGetTileRegion(anim[i].tileset, tile);
anim[i].elapsed = 0.0f;
}
*/
}
static void render(ecs_iter_t *it) {