Commit 4bcb64ed by BellCodeEditor

save project

parent d65a6d90
Showing with 15 additions and 2 deletions
......@@ -24,6 +24,19 @@ while True:
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event,type==locals.KEYDOWN:
if event.key==losee.k_SPACE:
jumpState="up"
if jumpState=="up":
if y>150:
y-=5
else:
jumpState=="down"
if jumpState=="down":
if y<400:
y+=5
else:
jumpState="runing"
wukong=hero[index]
index += 1
......@@ -36,4 +49,4 @@ while True:
screen.blit(wukong, (150, 400))
# 刷新画面
pygame.display.update()
FPS.tick(0.0000000000000000000000000000000001)
\ No newline at end of file
FPS.tick(60)
\ 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