2014-10-18 1 views

답변

0

이렇게하는 것이 간단합니다. 예를 들어

,

cat_image = "cat.png" 
mouse_c = pygame.image.load(mouse_image).convert_alpha() 

while True: 
for event in pygame.event.get(): 
    if event.type == QUIT: 
     pygame.quit() 
     sys.exit() 

x,y = pygame.mouse.get_pos() 
x -= mouse_c.get_width()/2 
y -= mouse_c.get_height()/2 

screen.blit(mouse_c,(x,y)) 

pygame.display.update() 

당신은 센터에 도착 절반 높이와 너비를 뺄 필요가있다.

관련 문제