Commit 305479b2 by BellCodeEditor

save project

parent 8914c9fc
Showing with 9 additions and 16 deletions
......@@ -22,8 +22,6 @@ js='r'
y=400
t=40
pygame.display.set_caption('急急如律令')
while True:
......@@ -32,27 +30,22 @@ while True:
# 接收到退出事件后退出程序
exit()
if event.type==locals.KEYDOWN:
if js=='r':
if event.key==locals.K_SPACE:
js='u'
if event.key==locals.K_SPACE:
js='u'
if js=='u':
if t > 0:
y-=t
t-=5
if y > 10:
y-=100
else:
js='d'
if js=='d':
if t <= 40:
y+=t
t+=5
if y < 400:
y+=3
else:
js='r'
t=40
wk = hero[index]
if js=='r':
index += 1
if index==5:
index=0
index += 1
if index==5:
index=0
# 将背景图画上去
screen.blit(background, (0, 0))
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