Commit d1138517 by BellCodeEditor

save project

parent 9e0c18b1
Showing with 7 additions and 2 deletions
......@@ -22,6 +22,7 @@ heroLength = len(hero)
state = "runing"
y = 400
t = 30
d = 30
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -29,8 +30,12 @@ while True:
exit()
if event.type == locals.KEYDOWN:
if event.key == locals.K_w and state == "runing":
state = "w"
if state == "w" :
y = 400
state = "up"
if event.key == locals.K_s:
y = 500
if state == "up" :
if t > 0:
y -= t
t -= 2
......
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