Commit 40c5764f by BellCodeEditor

save project

parent ac676a3c
Showing with 10 additions and 1 deletions
...@@ -5,6 +5,10 @@ from pygame import locals ...@@ -5,6 +5,10 @@ from pygame import locals
pygame.init() pygame.init()
bg=pygame.image.load('bg.png') bg=pygame.image.load('bg.png')
right=pygame.image.load('right.png') right=pygame.image.load('right.png')
body1=pygame.image.load('body.png')
body2=pygame.image.load('body.png')
body3=pygame.image.load('body.png')
apple=pygame.image.load('apple.png')
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
while True: while True:
...@@ -12,5 +16,9 @@ while True: ...@@ -12,5 +16,9 @@ while True:
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
screen.blit(right,(0,0)) screen.blit(right,(240,120))
screen.blit(body1,(210,120))
screen.blit(body2,(180,120))
screen.blit(body3,(180,90))
screen.blit(apple,(300,300))
pygame.display.update() 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