Commit ad437d38 by BellCodeEditor

save project

parent 0761e9f6
Showing with 7 additions and 5 deletions
......@@ -3,16 +3,18 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
# 创建一个窗口
pygame.display.set_mode((660,480))
screen=pygame.display.set_mode((660,480))
a=pygame.image.load('bg.png')
b=pygame.image.load('right.png')
c=pygame.image.load('apple.png')
d=pygame.image.load('body.png')
while True:
for event in pygame.event.get():
if event.type==locals.OUIT:
if event.type==locals.QUIT:
exit()
scrern.blit(a,(0,0))
scrern.blit(b,(240,180))
scrern.blit(c,(240,120))
screen.blit(a,(0,0))
screen.blit(b,(240,180))
screen.blit(c,(240,120))
screen.blit(d,(210,180))
pygame.display.update()
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