Animations now can have a stationary option which tries to keep them 'in place' while growing, effectively removing the forward motion.

This commit is contained in:
Zed A. Shaw 2025-03-04 12:12:27 -05:00
parent eb8fb82837
commit 8b414c13e6
8 changed files with 36 additions and 15 deletions

View file

@ -158,7 +158,7 @@ void Raycaster::sprite_casting(sf::RenderTarget &target) {
if($level.world->has<components::Animation>(rec.second)) {
auto& animation = $level.world->get<components::Animation>(rec.second);
if(animation.playing) animation.step(scale, in_texture);
if(animation.playing) animation.step(scale, position, in_texture);
}
sf_sprite->setOrigin(origin);