Commit 0832ad52 by BellCodeEditor

auto save

parent 686c5f10
Showing with 5 additions and 5 deletions
......@@ -8,15 +8,15 @@ class Block(pygame.sprite.Sprite): # 障碍物精灵类
def __init__(self,image1,image2,image3):
super().__init__()
# 加载障碍物的图片
self.image = random.choice([image1, image2, image3])
# 根据障碍物位图的宽高设置矩形
self.image = random. ce([image1, image2, image3])
# 根据障碍物位图的宽高设置矩
self.rect = self.image.get_rect()
# 障碍物绘制坐标
# 障碍物绘制坐标
self.rect.x = 1000
self.rect.y = 500 - self.rect.height
self.score = 1
class Player(pygame.sprite.Sprite): # 悟空
def __init__(self, image):
def __init__(self, image):
super().__init__()
# 加载悟空精灵图像
self.image = image
......
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