Commit f17fc4e6 by BellCodeEditor

save project

parent d3f4bab4
Showing with 2 additions and 8 deletions
......@@ -16,8 +16,8 @@ class Block(pygame.sprite.Sprite):
self.rect.y = 500 - self.rect.height
class Player(pygame.sprite,Sprite):
def __init__(self,image1,image2,image3):
super().__init__()
def _init_(self,image1,image2,image3):
super()._init_()
self.image = image
......@@ -50,7 +50,6 @@ rect.y = 500 - rect.height
bg_x = 0
road_x = 0
gamestate = Ture
#obstacle = Block(bush,cacti,stone)
block_list = pygame.sprite.Group()
......@@ -65,7 +64,6 @@ while True:
if event.key == locals.K_SPACE:
jumpState = "up"
if gamestate == Ture:
if jumpState == "up": # 起跳状态
if t > 0:
y -= t
......@@ -100,10 +98,6 @@ while True:
screen.blit(prop.image,(prop.rect.x,prop.rect.y))
if prop.rect.x<=0-prop.rect.winth:
prop.kill()
if pygame.sprite.collide_rect(wukong,sprite):
gameover = pygame.imgae.load("gameover.png")
screen.blit(gameover,(400,200))
gamestate = False
obstacle = random.choice([bush,stone,cacti])
......
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