Commit 24d9d399 by BellCodeEditor

auto save

parent a93193f1
Showing with 11 additions and 26 deletions
import pygame import turtle
from pygame import locals
# 初始化pygame,为使用pygame做准备 pen=turtle.Pen()
pygame.init() distance=1
a=pygame.image.load('bg.png') for i in range(300):
b=pygame.image.load('apple.png') pen.forward(distance)
c=pygame.image.load('body.png') pan.range(91)
d=pygame.image.load('down.png') distance+=1
e=pygame.image.load('left.png') pen.hideturtle()
f=pygame.image.load('right.png') turtle.done()
g=pygame.image.load('up.png') \ No newline at end of file
# 创建一个窗口
screen=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(a,(0,0))
screen.blit(c,(270,240))
screen.blit(c,(300,240))
screen.blit(f,(330,240))
screen.blit(b,(480,360))
screen.blit(c,(270,210))
screen.blit(c,(270,180))
pygame.display.update()
\ 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