Commit 6f69ca18 by BellCodeEditor

save project

parent e3351857
Showing with 4 additions and 3 deletions
......@@ -20,13 +20,14 @@ index = 0
jumpstates="running"
y=400
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
if event.type==locals.KEYDOWN:
if event.type==locals.K_SPACE:
if event.key==locals.K_SPACE:
print("1")
jumpstates="up"
if jumpstates=="up":
......@@ -35,10 +36,10 @@ while True:
else:
jumpstates="down"
if jumpstates=="down":
if y<400:
if y>400:
y+=5
else:
jumpstates="running"
jumpstates="runnng"
# 将背景图画上去
wukong=hero[index]
if index==len(hero)-1:
......
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