Commit 499a651c by BellCodeEditor

save project

parent d0c6041a
Showing with 16 additions and 5 deletions
......@@ -2,11 +2,22 @@ import pygame
# 初始化pygame,为使用pygame做准备
pygame.init()
bg=pygame.image.load('bg.png')
apple=pygame.image.load('apple.png')
body=pygame.image.load('body.png')
body=pygame.image.load('body.png')
body=pygame.image.load('body.png')
down=pygame.image.load('down.png')
# 创建一个窗口
pygame.display.set_mode((660,480))
screen=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event type==locals.QUIT:
if event.type==pygame.QUIT:
exit()
screen.blit()
\ No newline at end of file
screen.blit(bg,(0,0))
screen.blit(apple,(30,30))
screen.blit(body,(120,150))
screen.blit(body,(120,180))
screen.blit(body,(120,210))
screen.blit(down,(120,240))
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