Commit dab7da5a by BellCodeEditor

auto save

parent 2fda9314
Showing with 5 additions and 0 deletions
......@@ -2,6 +2,7 @@ import pygame
from pygame import locals
import random
pygame.init() # 初始化
class Block(pygame.sprite.Sprite): # 障碍物精灵类
......@@ -42,6 +43,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
basic_font = pygame.font.Font('STKAITI.TTF',32)
score_audio
index = 0
y = 400
jumpState = "runing"
......@@ -51,6 +53,8 @@ score = 0
bg_x = 0
time = 0
gamestate = True
score = 0
speed = 8
block_list =pygame.sprite.Group() # 创建精灵组
......@@ -63,6 +67,7 @@ while True:
if jumpState == "runing":
if event.key == locals.K_SPACE:
jumpState = "up"
speed = 8 + score//3
# 悟空造型
wukong = Player(hero[index])
......
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