2014-10-28 52 views
0

我正試圖用pygame創建一個遊戲,現在我正在試圖提升我的健康狀況。顯然,在背景圖片下面。有沒有辦法在背景上繪製/繪製?我試過重新安排訂單。Pygame blit在另一個之上?

screen.blit(healthbar, (5,5)) 

for health1 in range(healthvalue): 
    screen.blit(health, (health1+8,8)) 

screen.blit(background,(0,0)) 

建議還是我這樣做完全錯了?

回答

1

的順序是錯了,你應該畫的一切後更新屏幕:

screen.blit(backround,(0,0)) 

screen.blit(healthbar, (5,5)) 

for health1 in range(healthvalue): 
    screen.blit(health, (health1+8,8)) 

... 

pygame.display.flip() 
相關問題