Commit e0d4fb68 by BellCodeEditor

auto save

parent 04a3c280
Showing with 10 additions and 1 deletions
......@@ -3,7 +3,14 @@ from pygame import locals
import random
pygame.init() # 初始化
class Block
class Block(pygame.sprite.Sprite):
def _init_(self,image1,image2,image3):
super().__init__()
self.image = random.choice([image1,image2,image3])
rect = obstacle.get_rect()
rect.x = 1000
rect.y = 500 - self.rect.height
# 创建一个窗口
screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
......@@ -74,3 +81,4 @@ while True:
# 刷新画面
pygame.display.update()
FPS.tick(60)
\ No newline at end of file
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