Commit 9f76bc64 by BellCodeEditor

save project

parent 7f692927
Showing with 4 additions and 4 deletions
...@@ -19,7 +19,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -19,7 +19,7 @@ hero = [pygame.image.load('hero1.png'),
index = 0 index = 0
y=400 y=400
zhuangtai = "R" zhuangtai = "R"
t = 60 t = 45
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -27,7 +27,7 @@ while True: ...@@ -27,7 +27,7 @@ while True:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
if zhuangtai == "R": if zhuangtai == "r":
zhuangtai = "J" zhuangtai = "J"
if zhuangtai == "J": if zhuangtai == "J":
if t > 0: if t > 0:
...@@ -36,12 +36,12 @@ while True: ...@@ -36,12 +36,12 @@ while True:
else: else:
zhuangtai = "D" zhuangtai = "D"
if zhuangtai == "D": if zhuangtai == "D":
if t <= 60: if t <= 45:
y+=t y+=t
t+=3 t+=3
else: else:
zhuangtai = "R" zhuangtai = "R"
t = 60 t = 45
wukong = hero[index] wukong = hero[index]
if zhuangtai == "R": if zhuangtai == "R":
index +=1 index +=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