Skip to content

Commit

Permalink
limit
Browse files Browse the repository at this point in the history
  • Loading branch information
hayattgd committed Jan 16, 2025
1 parent e34188d commit 1ec7398
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public void Update()
DrawCurrent(animation.moves[currentMove].frames);
}

if (position.X < -32) position.X = -32;
if (position.X > Raylib.GetScreenWidth() + 32) position.X = Raylib.GetScreenWidth() + 32;

currentFrame++;
}
}

0 comments on commit 1ec7398

Please sign in to comment.