0
在每次更新中,我的精靈都會根據變量(OBJECT_X)調整自身的大小,但是當OBJECT_X發生變化時,精靈會變得更加像素化。我已經嘗試在每次更新中重新加載圖像,但這確實滯後於遊戲。有什麼建議麼?pygame中的Pixilating精靈
import pygame
screen = pygame.display.set_mode((1000, 600))
background = pygame.Surface((1000, 600))
OBJECT_SIZE = 500
Tree = pygame.image.load("Resourses/Objects/Tree.png").convert_alpha()
while True:
Tree = pygame.transform.scale(Tree, (OBJECT_SIZE, OBJECT_SIZE)
screen.blit(Tree, 500, 300))
pygame.display.flip()