Commit 6ae8b9d3 by BellCodeEditor

auto save

parent 38a8a248
Showing with 25 additions and 2 deletions
...@@ -3,10 +3,34 @@ from pygame import locals ...@@ -3,10 +3,34 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() 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)) a = pygame.display.set_mode((800,600))
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
print(event) print(event)
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
\ No newline at end of file
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