Commit 85db871f by BellCodeEditor

save project

parent 436db26f
Showing with 11 additions and 8 deletions
......@@ -27,12 +27,16 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
score_audio = pygame.mixer.Sound('score.wav')
basic_font = pygame.font.Font('STKAITI.TTF')
index = 0
y = 400
jumpState = "runing"
t = 30
gamestate = True
time = 0
score = 0
old_score = score
#obstacle = Block([bush, stone, cacti])
block_list = pygame.sprite.Group()
while True:
......@@ -44,12 +48,7 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
wukong = hero[index]
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
index = 0
if g
if gamestate == True:
if jumpState == "up": # 起跳状态
if t > 0:
y -= t
......@@ -65,7 +64,11 @@ while True:
t =30
# 悟空造型
wukong = hero[index]
if jumpState == "runing": # 跑步状态下
index += 1
if index >= 5:
index = 0
# 将背景图画上去
screen.blit(background, (0, 0))
# 远处背景
......
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