Skip to content

Commit b17326c

Browse files
Fixed the funne visual bug with platformer
wow!!
1 parent 79b1766 commit b17326c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ async fn main() {
14351435
}
14361436

14371437
GameState::Playing => {
1438-
for i in 0..2 {
1438+
for i in -1..2 {
14391439
draw_texture_ex(
14401440
&default_bg,
14411441
(i * 1920) as f32 - (bg_offset % 1920.0),
@@ -1504,7 +1504,7 @@ async fn main() {
15041504
}
15051505

15061506
// Draws the ground
1507-
for i in 0..screen_width() as i32 / 160 + 2 {
1507+
for i in -1..screen_width() as i32 / 160 + 2 {
15081508
draw_texture_ex(
15091509
&grnd_texture,
15101510
i as f32 * 155.0 - (world_offset % 155.0),

0 commit comments

Comments
 (0)