Refine how the raycaster.cpp uses animations so there's less back-and-forth on the intrect.
This commit is contained in:
parent
cded8a937e
commit
594be65f45
3 changed files with 18 additions and 5 deletions
|
|
@ -106,11 +106,8 @@ inline void step_animation(DinkyECS::World& world, DinkyECS::Entity entity, sf::
|
|||
|
||||
if(anim != nullptr && anim->playing) {
|
||||
anim->update();
|
||||
anim->apply(sprite);
|
||||
anim->apply(sprite, in_texture);
|
||||
anim->motion(sprite, position, scale);
|
||||
|
||||
auto& old_rect = sprite.getTextureRect();
|
||||
in_texture.position.x += old_rect.position.x;
|
||||
}
|
||||
|
||||
sprite.setScale(scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue