源碼說明
一款使用pygame制作的拼圖游戲,有多種方式選擇 5×5,4×4,3×3
長按左側(cè)二維碼 2 秒 (非本號(hào)) |
'''顯示游戲開始界面'''
def ShowStartInterface(screen, width, height):
screen.fill(BACKGROUNDCOLOR)
tfont = pygame.font.Font('./font/simkai.ttf', width//4)
cfont = pygame.font.Font('./font/simkai.ttf', width//20)
title = tfont.render('拼圖游戲', True, RED)
content1 = cfont.render('按H或M或L鍵開始游戲', True, BLUE)
content2 = cfont.render('H為5*5模式,M為4*4模式,L為3*3模式', True, BLUE)
trect = title.get_rect()
trect.midtop = (width/2, height/10)
crect1 = content1.get_rect()
crect1.midtop = (width/2, height/2.2)
crect2 = content2.get_rect()
crect2.midtop = (width/2, height/1.8)
screen.blit(title, trect)
screen.blit(content1, crect1)
screen.blit(content2, crect2)
pygame.display.update()
聯(lián)系客服