Commit 67d1f87f by BellCodeEditor

save project

parent ff76349e
Showing with 5 additions and 2 deletions
...@@ -10,7 +10,7 @@ fps = 30 ...@@ -10,7 +10,7 @@ fps = 30
# 创建窗口 # 创建窗口
screen = pygame.display.set_mode((460, 500)) screen = pygame.display.set_mode((460, 500))
pygame.display.set_caption("俄罗斯方块") pygame.display.set_caption("俄罗斯方块 @==[]二二二二7")
clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数) clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 载入素材 # 载入素材
bg = pygame.image.load('bg.png') bg = pygame.image.load('bg.png')
...@@ -23,9 +23,11 @@ while True: ...@@ -23,9 +23,11 @@ while True:
# 将背景图画上去 # 将背景图画上去
screen.blit(bg,(0,0)) screen.blit(bg,(0,0))
pygame.draw.rect(screen,(255,0,0),(120,20,20,20),0)
pygame.draw.rect(screen,(255,255,255),(120,20,20,20),1)
# 得分 # 得分
info=font.render(str(score),True,(0,0,0)) info=font.render(str(score),True,(0,0,0))
screen.blit(info,(350,70)) screen.blit(info,(330,70))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
clock.tick(fps) clock.tick(fps)
\ 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