Commit d7518116 by BellCodeEditor

save project

parent 5765d212
Showing with 30 additions and 1 deletions
......@@ -23,10 +23,20 @@ index = 0
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
if event.type == locals.QUIT
exit()
if jumpStae == "up"
if t > 0:
y -= t
t -= 2
else:
jumpStae = "down"
if jumpStae == "down"
# 接收到退出事件后退出程序
exit()
wukong = hero[index]
wukong = hero[index]
index += 1
if index == 5:
index = 0
......@@ -41,3 +51,21 @@ while True:
# 刷新画面
pygame.display.update()
FPS.tick(60)
if rect.x <= 0-rect.winth:
obstacle = random.choice([bush,stone,cacti])
rect = obstacle.get_rect()
rect.x = 1000
rect.y = 500 - rect.height
rect.
\ 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