Camera is now using Animate2 and it's mostly working, but there's a few more refactors needed.
This commit is contained in:
parent
46cc21ec7b
commit
364f66bffb
14 changed files with 106 additions and 62 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue