Commit 5c684a44 by BellCodeEditor

save project

parent ed5ade84
Showing with 16 additions and 1 deletions
......@@ -31,7 +31,9 @@ y = 400
jumpState = "runing"
t = 30
block_list = pygame.sprite.Group()
time=0
time=0.
while True:
for event in pygame.event.get():
......@@ -42,6 +44,15 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
wukong=player(here[index])
if jumpState="up"
if t>0:
if jumpState == "up": # 起跳状态
if t > 0:
......@@ -82,6 +93,9 @@ while True:
if obstacle.rect.x<=0-obstacle.rect.width:
obstacle.kill()
if pygame.sprite.collide_rect(wukong,obstacle):
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
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