Pygame |
1 | import pygame |
2 | pygame.init() |
3 | screen = pygame.display.set_mode ((700,600)) |
4 | image = pygame.image.load("hero.png") |
5 | keys = pygame.key.get_pressed() |
6 | if keys[pygame.K_RIGHT]: |
7 | hero_x -= 1 |
8 | while not game_over: |
9 | for event in pygame.event.get(): |
10 | if event.type == pygame.QUIT: |
11 | pygame.quit() |
12 | sys.exit() |
13 | pygame.font.Font() |
14 | screen.fill() |
15 | clock = pygame.time.Clock() |
16 | screen.blit(hero_image,(hero_x,hero_y))me.Clock() |
17 | game_over = True |
18 | pygame.display.update() |
Комментарии