Commit 6ae8b9d3 by BellCodeEditor

auto save

parent 38a8a248
Showing with 24 additions and 0 deletions
......@@ -3,6 +3,12 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
background = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
# 创建一个窗口
a = pygame.display.set_mode((800,600))
while True:
......@@ -10,3 +16,21 @@ while True:
print(event)
if event.type == locals.QUIT:
exit()
a.blit(background,(0,0))
a.blit(right,(240,120))
a.blit(food,(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