Commit 4dea09ea by BellCodeEditor

save project

parent d784720f
Showing with 4 additions and 2 deletions
...@@ -35,8 +35,10 @@ while True: ...@@ -35,8 +35,10 @@ while True:
screen.blit(background,(0,0)) screen.blit(background,(0,0))
#画方块 #画方块
pygame.draw.rect(screen,(255,0,0),(weizhi[1]*20-20,weizhi[0]*20-20,20,20),0)#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出红色且内部填充(width=0)的20宽20高的正方形 pygame.draw.rect(screen,(255,0,0),(weizhi[1]*20-20,weizhi[0]*20-20,20,20),0)
pygame.draw.rect(screen,(255,255,255),(weizhi[1]*20-20,weizhi[0]*20-20,20,20),1)#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出20宽20高的白色边框(width=1),为正方形的边框 #在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出红色且内部填充(width=0)的20宽20高的正方形
pygame.draw.rect(screen,(255,255,255),(weizhi[1]*20-20,weizhi[0]*20-20,20,20),1)
#在屏幕中weizhi[1]*20-20(x坐标),weizhi[0]*20-20(y坐标)的位置画出20宽20高的白色边框(width=1),为正方形的边框
# 得分 # 得分
score_text = font.render(str(score),True,(0,0,0)) score_text = font.render(str(score),True,(0,0,0))
......
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