Skip to content

Commit

Permalink
Merge pull request #12 from dasi/main
Browse files Browse the repository at this point in the history
Fix Walkers walking backwards
  • Loading branch information
ninjamuffin99 committed Jul 11, 2024
2 parents c6fe131 + d6ce9b4 commit 6e82e47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/Walker.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Walker extends FlxSprite
velocity.x = 0;
if (++_s >= _smoke.length)
_s = 0;
_smoke.members[_s].x = x + ((facing == LEFT) ? (width - 22) : 10);
_smoke.members[_s].x = x + ((facing == LEFT) ? 10 : (width - 22));
_smoke.members[_s].y = y + height;
_smoke.members[_s].start(false, _smoke.members[_s].frequency);
}
Expand All @@ -66,7 +66,7 @@ class Walker extends FlxSprite
{
_walkTimer = FlxG.random.float(2, 6);
animation.play("walk");
velocity.x = (facing == LEFT) ? 40 : -40;
velocity.x = (facing == LEFT) ? -40 : 40;
}
else
{
Expand All @@ -75,7 +75,7 @@ class Walker extends FlxSprite

if (++_s >= _smoke.length)
_s = 0;
_smoke.members[_s].x = x + ((facing == LEFT) ? (width - 22) : 10);
_smoke.members[_s].x = x + ((facing == LEFT) ? 10 : (width - 22));
_smoke.members[_s].y = y + height;
_smoke.members[_s].start(false, _smoke.members[_s].frequency);
}
Expand Down

0 comments on commit 6e82e47

Please sign in to comment.