Make enemies always twitch forward a bit, even if they have animation frames.
This commit is contained in:
parent
389690e5c3
commit
806f8e4e1a
2 changed files with 10 additions and 10 deletions
|
@ -48,10 +48,10 @@ namespace components {
|
|||
|
||||
void Animation::step(sf::Vector2f& scale_out, sf::IntRect& rect_out) {
|
||||
if(playing && current < frames) {
|
||||
if(simple) {
|
||||
scale_out.x += scale;
|
||||
scale_out.y += scale;
|
||||
} else {
|
||||
scale_out.x += scale;
|
||||
scale_out.y += scale;
|
||||
|
||||
if(!simple) {
|
||||
rect_out.position.x += current * TEXTURE_WIDTH;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue