Compare commits

..

No commits in common. "5976f41f12164eee328d03214692c377d513c765" and "5e3cce852e04b2e9ba466be1b750c823a8fe56ad" have entirely different histories.

3 changed files with 1 additions and 7 deletions

View File

@ -1,5 +1,4 @@
import pygame
from PIL import Image
class GameContext:
dust_car_speed = 20
@ -10,10 +9,4 @@ class GameContext:
canvas = None
def startup(game_context: GameContext):
render_background(game_context)
game_context.canvas.blit(game_context.dust_car_pygame, (game_context.dust_car_position_x, game_context.dust_car_position_y))
def render_background(game_context: GameContext):
bg_img = Image.open("imgs/background.jpg")
pygame_bg_image = pygame.image.frombuffer(bg_img.tobytes(), bg_img.size, 'RGB')
game_context.canvas.blit(pygame_bg_image, (0, 0))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

View File

@ -26,4 +26,5 @@ while not exit:
exit = True
else:
handle_game_event(event, game_context)
pygame.display.update()