Commit 88a2e2e3 by BellCodeEditor

save project

parent e41cc333
Showing with 13 additions and 7 deletions
......@@ -3,7 +3,7 @@ from pygame import locals
y=400
s="running"
t=30
pygame.init() # 初始化
# 创建一个窗口
......@@ -32,17 +32,23 @@ while True:
if event.type==locals.KEYDOWN:
if event.key==locals.K_SPACE:
print("1111")
s="up"
if s=="running":
s='up'
if s=="up":
if y>150:
y-=5
if t>0:
y-=t
t-=2
else:
s="down"
s='down'
if s=="down":
if y<400:
y+=5
if t<=30:
y+=t
t+=2
else:
s="running"
t=30
if s=="running":
wukong=hero[index]
index+=1
if index==5:
......
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