Commit d90d9389 by BellCodeEditor

auto save

parent c6188a1e
Showing with 29 additions and 2 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
?? secroon=pygame.display.set_mode((660,480))
\ No newline at end of file shetuo1=pygame.image.load('bg.png')
shetuo=pygame.image.load('right.png')
shetuo2=pygame.image.load('apple.png')
shetuo3=pygame.image.load('body.png')
FPSCLOCK = pygame.time.Clock()
x,y=150,120
i=[(90,90),(90,120),(120,120),(x,y)]
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
x+=30
secroon.blit(shetuo1,(0,0))
secroon.blit(shetuo,(x,y))
secroon.blit(shetuo2,(180,120))
i.append((x,y))
i.pop(0)
for a in range(len(i)-1):
secroon.blit(shetuo3,i[a])
pygame.display.update()
FPSCLOCK.tick(3)
\ 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