Very basic animations

This commit is contained in:
2023-11-12 18:03:55 +01:00
parent bf56b150cc
commit 526d292fb5
9 changed files with 95 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
#include <rlImGui.h>
#include "systems/systems.h"
#include "utils/building_types.h"
#include "components.h"
#include "game_state.h"
@@ -82,6 +83,8 @@ bool init(Game *game) {
bzTileMapOverrideObjectGroup(&game->map, OBJECTS_GAME, initGameObjectsLayer);
bzTileMapOverrideObjectGroup(&game->map, OBJECTS_ENTITIES, initEntityObjectsLayer);
ECS_SYSTEM(ECS, updateAnimations, EcsOnUpdate, Animation, TextureRegion);
ECS_SYSTEM(ECS, renderEntities, EcsOnUpdate, Position, Size, Rotation, TextureRegion);
return true;
}
@@ -146,6 +149,8 @@ void render(float dt, Game *game) {
bzTileMapDraw(&game->map);
bzTileMapDrawColliders(&game->map);
ecs_progress(ECS, dt);
EndMode2D();
}