Commit 18375e5f by BellCodeEditor

save project

parent 76c492fd
Showing with 8 additions and 0 deletions
...@@ -14,6 +14,12 @@ cacti = pygame.image.load('cacti.png') # 仙人掌 ...@@ -14,6 +14,12 @@ cacti = pygame.image.load('cacti.png') # 仙人掌
apple = pygame.image.load('bush.png') # 灌木丛 apple = pygame.image.load('bush.png') # 灌木丛
hero = pygame.image.load('hero1.png') hero = pygame.image.load('hero1.png')
index = 0 index = 0
wukong=['pygame.image.load('hear1.png'),
'pygame.image.load('hear2.png'),
'pygame.image.load('hear3.png'),
'pygame.image.load('hear4.png'),
'pygame.image.load('hear5.png']
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
...@@ -21,6 +27,8 @@ while True: ...@@ -21,6 +27,8 @@ while True:
# 接收到退出事件后退出程序 # 接收到退出事件后退出程序
exit() exit()
if index>len(wukong)-1:
index+=1
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
screen.blit(road, (0, 500)) screen.blit(road, (0, 500))
......
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