[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] functions
- To: pygame-users@xxxxxxxx
- Subject: [pygame] functions
- From: "Gonzalo Castro" <gonzalo.castro.castilla@xxxxxxxxx>
- Date: Sat, 9 Aug 2008 11:17:06 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 09 Aug 2008 05:17:20 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=FNuWOb/XQ3V0GCneadujXG/p+WWfjJEQcydVfkwVKj4=; b=POfH4E1UvzjV8J2Lpc2thL++JM3QCvuNJouvW99br/BrKwIj5J5GQII+FKlwd27qsO JMKyAmLAGZuNpQlhL/2VVWtmVTXU7RtaRCOeMH394kKgEkjgBe2jGpZH5Z1VM1d6fv2e Jk4Sor146cnLYiICzuZJL6F9WzOePN+YM/GdM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=lNZhgN4phLYqt3moOZRXbYzabq0DSKfQrX6WdVxDSKat8kEmEuGJpY7twj67ENr+nC nLA5Px9EcJD0kJRTJTAIlRtOqMLlHT5GuRoEaXWgmpRR/J5QkO955JOjvGPypS6ixBbZ wPZ5UFgoe5KrXhK35hpARV4PdyKdR1e5YtIUI=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello everybody!
I'm starting with pygame... It's being difficoult... it's the first
time I program with objects ;)
So... could you help me with this functions? I couldn't find the
answer in the online help of python (yes, importing pygame previously)
#Some of code from class Player ;)
class Player(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self, self.containers) #self.
containers??? what does that?
self.image = pygame.Surface((16, 64))
self.image.fill((255, 255, 255), (2, 0, 12, 64))
self.image.fill((255, 255, 255), (0, 2, 16, 60))
self.rect = self.image.get_rect(midleft = (10, 240))
#image.get_rect??? and you asign a value to midleft?
self._rect = Rect(self.rect)
#function Rect? convert to rect type maybe??
#End of code
Sorry about my english, I'm spaniard and I still have to improve it.
Thanks a lot :)
PD: this class it's taken from PyMike's pong game