Commit fc23d5d0 by BellCodeEditor

save project

parent 79579718
Showing with 4 additions and 1 deletions
......@@ -14,6 +14,7 @@ class Block(pygame.sprite.Sprite): # 障碍物精灵类
# 障碍物绘制坐标
self.rect.x = 1000
self.rect.y = 500 - self.rect.height
self.score=1
class Player(pygame.sprite.Sprite): # 悟空
def __init__(self, image):
......@@ -40,6 +41,7 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')]
font=pygame.font.Font()
index = 0
y = 400
jumpState = "runing"
......@@ -49,7 +51,8 @@ bg_x = 0
time = 0
gamestate = True
if pygame.sprite.collide_rect(wukong,sprite)
if pygame.sprite.collide_rect(wukong,sprite):
gameover =
block_list =pygame.sprite.Group() # 创建精灵组
......
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