Commit 1a00a89d by BellCodeEditor

save project

parent c5e33ac2
Showing with 1 additions and 8 deletions
...@@ -9,13 +9,6 @@ class Block(pygame.sprite.Sprite): ...@@ -9,13 +9,6 @@ class Block(pygame.sprite.Sprite):
self.rect=self.image.get_rect() self.rect=self.image.get_rect()
self.rect.x=1000 self.rect.x=1000
self.rect.y=500-self.rect.height self.rect.y=500-self.rect.height
class Block(pygame.sprite.Sprite):
def __init__(self,image):
super().__init__()
self.image=image
self.rect=self.image.get_rect()
self.rect.x=150
self.rect.y=400
pygame.init() # 初始化 pygame.init() # 初始化
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((1000, 600)) screen = pygame.display.set_mode((1000, 600))
...@@ -41,7 +34,7 @@ t = 30 ...@@ -41,7 +34,7 @@ t = 30
bg_x=0 bg_x=0
road_x=0 road_x=0
time=0 time=0
gamestate=True
block_list=pygame.sprite.Group() block_list=pygame.sprite.Group()
# obstacle=random.choice([bush,stone,cacti]) # obstacle=random.choice([bush,stone,cacti])
# rect=obstacle.get_rect() # rect=obstacle.get_rect()
......
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