pygame

Still Having Problems With Rotating Cannon's Properly Towards The Player Pygame

半腔热情 提交于 2020-11-25 02:45:13
问题 few people have helped me with this problem before but the rotation is still messed up my Cannons wont rotate towards the player good they are all out of place I really need help with this problem its my first time trying to make something rotate towards a player I am trying to make my cannon mouth rotate towards player, but the rotation is messed up and up I don't know how to fix it. class enemyshoot: def __init__(self,x,y,height,width,color): # [...............] self.look_at_pos = (x,y) def

How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate]

…衆ロ難τιáo~ 提交于 2020-11-24 22:57:21
问题 This question already has answers here : What is a good way to draw images using pygame? (4 answers) Closed 23 days ago . I'm trying to blit a PNG image onto a surface, but the transparent part of the image turns black for some reason, here's the simple code: screen = pygame.display.set_mode((800, 600), pygame.DOUBLEBUF, 32) world = pygame.Surface((800, 600), pygame.SRCALPHA, 32) treeImage = pygame.image.load("tree.png") world.blit(treeImage, (0,0), (0,0,64,64)) screen.blit(world, pygame.rect

How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate]

家住魔仙堡 提交于 2020-11-24 22:54:42
问题 This question already has answers here : What is a good way to draw images using pygame? (4 answers) Closed 23 days ago . I'm trying to blit a PNG image onto a surface, but the transparent part of the image turns black for some reason, here's the simple code: screen = pygame.display.set_mode((800, 600), pygame.DOUBLEBUF, 32) world = pygame.Surface((800, 600), pygame.SRCALPHA, 32) treeImage = pygame.image.load("tree.png") world.blit(treeImage, (0,0), (0,0,64,64)) screen.blit(world, pygame.rect

How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate]

怎甘沉沦 提交于 2020-11-24 22:53:35
问题 This question already has answers here : What is a good way to draw images using pygame? (4 answers) Closed 23 days ago . I'm trying to blit a PNG image onto a surface, but the transparent part of the image turns black for some reason, here's the simple code: screen = pygame.display.set_mode((800, 600), pygame.DOUBLEBUF, 32) world = pygame.Surface((800, 600), pygame.SRCALPHA, 32) treeImage = pygame.image.load("tree.png") world.blit(treeImage, (0,0), (0,0,64,64)) screen.blit(world, pygame.rect

How do I blit a PNG with some transparency onto a surface in Pygame? [duplicate]

為{幸葍}努か 提交于 2020-11-24 22:50:32
问题 This question already has answers here : What is a good way to draw images using pygame? (4 answers) Closed 23 days ago . I'm trying to blit a PNG image onto a surface, but the transparent part of the image turns black for some reason, here's the simple code: screen = pygame.display.set_mode((800, 600), pygame.DOUBLEBUF, 32) world = pygame.Surface((800, 600), pygame.SRCALPHA, 32) treeImage = pygame.image.load("tree.png") world.blit(treeImage, (0,0), (0,0,64,64)) screen.blit(world, pygame.rect