Advertisement
OtsoSilver

Untitled

Sep 4th, 2021
940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import pygame
  2. #Настройки окна
  3. WIDTH = 500
  4. HEIGHT = 500
  5. FPS = 60
  6.  
  7. #Настройка цвета
  8. BLACK = (0,0,0)
  9. WHITE = (255,255,255)
  10. RED = (255,0,0)
  11. BLUE = (0,0,255)
  12.  
  13. #Инициализация
  14. pygame.init()
  15. screen = pygame.display.set_mode((WIDTH,HEIGHT))
  16. clock = pygame.time.Clock()
  17.  
  18. #Время
  19. lastTime = 0
  20. currentTime = 0
  21.  
  22. moving = ''
  23. running = True
  24. while running:
  25.     for i in pygame.event.get():
  26.         if i.type == pygame.QUIT:
  27.             running = False
  28.    
  29.     pygame.display.update()
  30.     clock.tick(FPS)
  31. pygame.quit()
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement