Commit 3a221ad1 by BellCodeEditor

save project

parent 1f428d59
Showing with 10 additions and 5 deletions
import pygame
from pygame import locals
t=30
pygame.init() # 初始化
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......@@ -30,15 +30,20 @@ while True:
if event.key== locals.K_SPACE:
Jump='up'
if Jump=='up':
if y>150:
y-=5
if t>0:
y-=t
t-=2
else:
Jump='down'
if Jump=='down':
if y<400:
y+=5
if t<=30:
y+=t
t+=2
else:
Jump='running'
t=30
wukong = hero[i]
i+=1
if i>4:
......
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