Commit 27a25fed by BellCodeEditor

save project

parent fd1e3118
Showing with 12 additions and 0 deletions
...@@ -3,6 +3,10 @@ from pygame import locals ...@@ -3,6 +3,10 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
backgroud=pygame.image.load('bg.png')
a=pygame.image.load('apple.png')
b=pygame.image.load('right.png')
c=pygame.image.load('body.png')
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
...@@ -11,3 +15,10 @@ while True: ...@@ -11,3 +15,10 @@ while True:
print(event) print(event)
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
screen.blit(backgroud,(0,0))
screen.blit(c,(150,180))
screen.blit(c,(150,150))
screen.blit(c,(180,180))
screen.blit(b,(210,180))
screen.blit(a,(120,180))
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