Commit 08067ad1 by BellCodeEditor

save project

parent 2300168b
Showing with 11 additions and 1 deletions
......@@ -9,6 +9,13 @@ class Block(pygame.sprite.Sprite):
self.rect=self.image.get_rect()
self.rect.x=1000
self.rect.y=500-self.rect.height
class Block(pygame.sprite.Sprite):
def __init__(self,image):
super().__init__()
self.image=random.choice([image1,image2,image3])
self.rect=self.image.get_rect()
self.rect.x=500
self.rect.y=400
pygame.init() # 初始化
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......@@ -93,7 +100,10 @@ while True:
prop.rect.x -=8
screen.blit(prop.image,(prop.rest.x, prop.rect.y))
if prop.rest.x <=0-prop.rect.width:
prop.skill
prop.skill()
if pygame.sprite.collide_rect(wukong, sprite)
gameover = pygame.imaae.load("gameover.png")
screen.blit(gameover.(400,200))
......
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