Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1 Импорт Нужных библиотек
- import pygame, sys
- #/1
- #2 Переменные
- fps = 24
- pygame.init()
- screen = pygame.display.set_mode((1080, 720))
- clock = pygame.time.Clock()
- #/2
- #3 Отрисовка Анимации
- while True:
- screen.fill("white")
- #4 Тут твой код для анимации
- #/4
- #5 Обработчик Событий
- for event in pygame.event.get():
- if event.type == pygame.QUIT or event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
- pygame.quit()
- sys.exit()
- #/5
- #6 Магия
- pygame.display.flip()
- clock.tick(fps)
- #/6
- #/3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement