Commit dfdd1cf5 by BellCodeEditor

save project

parent d4c05815
Showing with 7 additions and 0 deletions
...@@ -4,6 +4,9 @@ from pygame import locals ...@@ -4,6 +4,9 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
backgroud = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
apple = pygame.image.load('apple.png')
# 创建一个窗口 # 创建一个窗口
screen=pygame.display.set_mode((800,600)) screen=pygame.display.set_mode((800,600))
while True: while True:
...@@ -11,4 +14,8 @@ while True: ...@@ -11,4 +14,8 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
screen.blit(backgroud,(0,0))
screen.blit(right,(240,120))
screen.blit(apple,(360,300))
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