Commit f8672113 by BellCodeEditor

auto save

parent 6bc775a3
Showing with 31 additions and 2 deletions
import pygame
from pygame import locals
screen = pygame.display.set_mode((1000,600))
pygame.display.set_caption("悟空酷跑")
fps = pygame.time.Clock()
bg = pygame.image.load("bg.png")
bush = pygame.image.load("bush.png")
cacti = pygame.image.load("cacti.png")
stone = pygame.image.load("stone.png")
road = pygame.image.load("road.png")
hero = [pygame.image.load("hero1.png"),pygame.image.load("hero2.png"),pygame.image.load("hero3.png"),pygame.image.load("hero4.png"),pygame.image.load("hero5.png")]
index = 0
wukong = hero[index]
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
index += 1
if index > 4:
index = 0
wukong = hero[index]
screen.blit(bg,(0,0))
screen.blit(road,(0,500))
screen.blit(wukong,(150,400))
pygame.display.update()
fps.tick(60)
\ No newline at end of file
{"第1名": 0, "第2名": 0, "第3名": 0}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment