/
Dragon925
/
Python-Graphics
Обзор
Документация
Войти
/
Dragon925
/
Python-Graphics
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
lesson_26
dino.py
32 строки
725 B
Alexandr Romanov
Пример выполнения задания 14
03 апр 2025, 18:15
03 апр 2025, 18:15
d9b9937
Код
Авторство
О чём код?
import pygame from random import choice, randint import display import classes #Параметры игрового поля и fps WIDTH, HEIGHT = 1400, 600 start_fps = 70 fps = start_fps pygame.init() screen = pygame.display.set_mode((WIDTH, HEIGHT)) clock = pygame.time.Clock() dino = classes.Dino(100, HEIGHT // 2, "images/dino/dino_1.png") ground = classes.Ground( dino.rect.y + dino.rect.height - 20, "images/world/ground.png", 10 ) while True: # Выход по нажатию крестика for event in pygame.event.get(): if event.type == pygame.QUIT: exit() display.draw_world(screen, ground) dino.draw(screen) pygame.display.update() clock.tick(fps)