python - How to use PyGame.sprite -


i ditching python desk top , writing zombie game friends. have looked , looked don't understand it. explain how use pre-existing image , make sprite, check sprite collision? top down, way.

this python 2.7 , pygame 1.8.1.

alright, pygame sprite object bass class can used create other classes can use things collision detection:

class player(pygame.sprite):     def __init__(self):         self.image = pygame.image.load("player.png").convert_alpha()         self.rect = self.image.get_rect()         self.pos = self.rect.x, self.rect.y         #etc....... 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -