[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re:



oh. Thanks for your help!

--- On Sun, 1/11/09, Jake b <ninmonkeys@xxxxxxxxx> wrote:

From: Jake b <ninmonkeys@xxxxxxxxx>
Subject: [pygame] Re:
To: pygame-users@xxxxxxxx
Date: Sunday, January 11, 2009, 3:09 PM


-----Inline Attachment Follows-----

You need to call the parent class's init function:

class basicsprite(pygame.sprite.Sprite): #create a sprite class
   def __init__(self, img):
       pygame.sprite.Sprite.__init__(self)
       self.image = pygame.image.load(img).convert_alpha()
       self.rect = self.image.get_rect()


--
Jake