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:
parent
eb8fb82837
commit
8b414c13e6
8 changed files with 36 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue