Commit 499a651c by BellCodeEditor

save project

parent d0c6041a
Showing with 16 additions and 5 deletions
...@@ -2,11 +2,22 @@ import pygame ...@@ -2,11 +2,22 @@ import pygame
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() 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: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event type==locals.QUIT: if event.type==pygame.QUIT:
exit() exit()
screen.blit() screen.blit(bg,(0,0))
\ No newline at end of file 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