Commit c4ad518a by BellCodeEditor

save project

parent 15e653dd
Showing with 3 additions and 0 deletions
...@@ -5,6 +5,7 @@ pygame.init() ...@@ -5,6 +5,7 @@ pygame.init()
backgrond = pygame.image.load('bg.png') backgrond = pygame.image.load('bg.png')
food=pygame.image.load('apple.png') food=pygame.image.load('apple.png')
right=pygame.image.load('right.png') right=pygame.image.load('right.png')
body=pygame.image.load('body.png')
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660,480)) screen = pygame.display.set_mode((660,480))
while True: while True:
...@@ -12,8 +13,10 @@ while True: ...@@ -12,8 +13,10 @@ while True:
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
screen.blit(backgrond,(0,0)) screen.blit(backgrond,(0,0))
screen.blit(right,(270,120)) screen.blit(right,(270,120))
screen.blit(food,(360,300)) screen.blit(food,(360,300))
screen.blit(body,(240,120))
pygame.display.update() 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