- Added background
parent
c1f1c85d45
commit
0557712ed4
8
game.py
8
game.py
|
@ -29,7 +29,7 @@ def main():
|
|||
# initialize_screen() won't work for dualscreen
|
||||
#size = initialize_screen()
|
||||
size = (800, 600)
|
||||
bg = BLACK
|
||||
bg = pygame.image.load("img/background.png")
|
||||
desired_fps = 10
|
||||
font = pygame.font.Font(None, 40)
|
||||
|
||||
|
@ -59,7 +59,11 @@ def main():
|
|||
while running:
|
||||
time_passed = clock.tick(desired_fps)
|
||||
fps = clock.get_fps()
|
||||
screen.fill(bg)
|
||||
if type(bg) is tuple:
|
||||
screen.fill(bg)
|
||||
else:
|
||||
screen.blit(pygame.transform.scale(bg,(800,600)),(0,0))
|
||||
|
||||
|
||||
# Let's add the lawyer and have him announce a color
|
||||
fullegast.setColor(color)
|
||||
|
|
Loading…
Reference in New Issue