Advertisement
OtsoSilver

Untitled

Sep 18th, 2021
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. import pygame
  2. import random
  3.  
  4. #Настройки окна
  5. WIDTH = 500
  6. HEIGHT = 500
  7. FPS = 60
  8.  
  9. # Цвета
  10. YELLOW = (255, 255, 0)
  11. SKY = (133, 193, 233)
  12. GREEN = (46, 204, 113)
  13. WHITE = (255, 255, 255)
  14.  
  15. #Инициализация
  16. pygame.init()
  17. screen = pygame.display.set_mode((WIDTH,HEIGHT))
  18. clock = pygame.time.Clock()
  19.  
  20. bird_img = pygame.image.load('fpbs1.png').convert()
  21. bird_rect =  bird_img.get_rect()
  22. bh = bird_rect.height
  23. bw = bird_rect.width
  24.  
  25. bird = pygame.Rect(40,40, bw, bh)
  26. points = 0
  27.  
  28. font = pygame.font.SysFont('comic sans ms', 30)
  29. game_over_font = pygame.font.SysFont('comic sans ms', 50)
  30. game_over_text = game_over_font.render('GAME OVER', 1, WHITE)
  31.  
  32.  
  33. running = True
  34. while running:
  35.     for i in pygame.event.get():
  36.         if i.type == pygame.QUIT:
  37.             running = False
  38.  
  39.     clock.tick(FPS)
  40.     pygame.display.update()
  41. pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement