Commit 5ead0f35 by BellCodeEditor

auto save

parent cd45bf18
Showing with 5 additions and 4 deletions
......@@ -4,14 +4,15 @@ import random
pygame.init() # 初始化
class Player(pygame.sprite.Sprite):
def __init__(self,image):
class Block(pygame.sprite.Sprite):
def __init__(self,image1,image2,image3):
super().__init__()
self.image = image
self.image = random.choice([image1,image2,image3])
self.rect = self.image.get_rect()
self.rect.x = 150
self.rect.x = 1000
self.rect.y = 500 - self.rect.height
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
......
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