OtsoSilver

Untitled

Sep 18th, 2021
571
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. bw = bird_rect.width
  23. bh = bird_rect.height
  24. bird  = pygame.Rect(40, 40, bw, bh)
  25. points = 0
  26. font = pygame.font.SysFont('comic sans ms', 30)
  27. game_over_font = pygame.font.SysFont('comic sans ms', 50)
  28. game_over_text = game_over_font.render('GAME OVER', 1, WHITE)
  29.  
  30. running = True
  31. while running:
  32.     screen.fill(SKY)
  33.     for i in pygame.event.get():
  34.         if i.type == pygame.QUIT:
  35.             running = False
  36.    
  37.     clock.tick(FPS)
  38.     pygame.display.update()
  39. pygame.quit()
RAW Paste Data