Commit f4f80c08 by BellCodeEditor

save project

parent c9cf48b6
Showing with 13 additions and 1 deletions
...@@ -3,14 +3,26 @@ from pygame import locals ...@@ -3,14 +3,26 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
bg=pygame.image.load('bg.png')
s=pygame.image.load('up.png')
a=pygame.image.load('apple.png')
b=pygame.image.load('body.png')
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
while True: while True:
pygame.event.get() screen.blit(bg,(0,0))
screen.blit(s,(180,60))
screen.blit(a,(90,90))
screen.blit(b,(210,120))
screen.blit(b,(180,120))
screen.blit(b,(180,90))
for event in pygame.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
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