Camera is now using Animate2 and it's mostly working, but there's a few more refactors needed.

This commit is contained in:
Zed A. Shaw 2026-02-20 00:15:19 -05:00
parent 46cc21ec7b
commit 364f66bffb
14 changed files with 106 additions and 62 deletions

View file

@ -252,10 +252,11 @@ namespace animation {
void configure(DinkyECS::World& world, DinkyECS::Entity entity) {
auto sprite = world.get_if<Sprite>(entity);
if(sprite != nullptr && animation::has(sprite->name)) {
world.set<Animation>(entity, animation::load(sprite->name));
}
}
}
void step_animation(DinkyECS::World& world, DinkyECS::Entity entity, sf::Vector2f& scale_out, sf::Vector2f& pos_out, sf::IntRect& rect_out) {
if(auto animation = world.get_if<components::Animation>(entity)) {