Commit 7232450e by BellCodeEditor

save project

parent 69c3c495
Showing with 5 additions and 4 deletions
......@@ -31,7 +31,7 @@ class Block(pygame.sprite.Sprite):
self.rect=self.image.get_rect()
self.rect.x=1000
self.rect.y=500-self.rect.height
self.score=10
self.score=1
class Player(pygame.sprite.Sprite):
def __init__(self,image):
......@@ -59,7 +59,6 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
speed=speed+new_score//30 # 加速
wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下
index += 1
......@@ -112,9 +111,10 @@ while True:
new_score+=sprite.score
sprite.score=0
if new_score>old_score:
old_score=new_score
old_score=new_score # 加速
speed=speed+new_score//3
score_music.play()
text=sss.render('SCORE:'+str(new_score),True,(0,0,0))
screen.blit(text,(0,0))
pygame.display.update()# 刷新画面
FPS.tick(50)
FPS.tick(50)
\ 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