Commit ec6f2a3d by BellCodeEditor

save project

parent 156705c0
Showing with 5 additions and 2 deletions
......@@ -3,9 +3,10 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
background = pygame.image.load('bg.png')
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
# 创建一个窗口
screen = pygame.display.set_mode((640,480))
while True:
......@@ -14,6 +15,8 @@ while True:
exit()
screen.blit(background,(0,0))
screen.blit(right,(300,150))
screen.blit(food,(300,200))
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