Commit 74d36abe by BellCodeEditor

auto save

parent d11eaab7
Showing with 4 additions and 16 deletions
......@@ -4,24 +4,11 @@ from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
banck = pygame.image.load("bg.png")
snack = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
s_body = pygame.image.load("body.png")
# 创建一个窗口
# 创建一个窗口+
screen = pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(banck,(0,0))
screen.blit(snack,(240,120))
screen.blit(food,(480,360))
a=210
for i in range(2):
screen.blit(s_body,(a,120))
a-=30
screen.blit(s_body,(a+30,90))
pygame.display.update()
exit()
\ 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