Skip to content

Commit

Permalink
Willy render order
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbrianhall committed Jan 2, 2025
1 parent ff26c81 commit a0dc7e9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions willy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1552,17 +1552,6 @@ def game(screen, currentlevel, level, SCALER, wasd=False, flash=True, numberofba
screen.blit(char_img, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))
# print(char_img)

# print(willy_direction)
if willy_direction == "LEFT":
char_img = font["WILLY_LEFT"]
else:
char_img = font["WILLY_RIGHT"]
row, col = willy_position
black_surface = pygame.Surface((CHAR_WIDTH * SCALER, CHAR_HEIGHT * SCALER))
black_surface.fill((screenfillred, screenfillgreen, screenfillblue))
screen.blit(black_surface, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))
screen.blit(char_img, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))

font_size = 8 * SCALER
fontdata = pygame.font.SysFont(None, int(font_size))

Expand Down Expand Up @@ -1621,6 +1610,17 @@ def game(screen, currentlevel, level, SCALER, wasd=False, flash=True, numberofba

screen.blit(char_img, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))

# print(willy_direction)
if willy_direction == "LEFT":
char_img = font["WILLY_LEFT"]
else:
char_img = font["WILLY_RIGHT"]
row, col = willy_position
black_surface = pygame.Surface((CHAR_WIDTH * SCALER, CHAR_HEIGHT * SCALER))
black_surface.fill((screenfillred, screenfillgreen, screenfillblue))
screen.blit(black_surface, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))
screen.blit(char_img, (int(col) * CHAR_WIDTH * SCALER, int(row) * CHAR_HEIGHT * SCALER))

for ball in balls:
# print(balls[ball])
col = balls[ball]["Location"][1]
Expand Down

0 comments on commit a0dc7e9

Please sign in to comment.