Oops..sorry, I forgot putting the "self" argument, I mean, in fact
that argument is on my code. I found that when I initialysed (is this
correct?) my self.rect variable, I was doing self.rect=0, and that
seems to be the problem, now I do self.rect=pygame.Rect(0,0,0,0) and
now it goes well..
If the self argument ( sean's post ) doesn't fix the problem, it could
be that the Rect() is actually a tuple. I ran into this before.
To fix this, see:
http://www.mail-archive.com/pygame-users@seul.org/msg05338.html
On Dec 26, 2007 4:04 AM, <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi everyone,
>
> Fir
For your class member methods, you need to pass in 'self' as an argument.
So try changing them to:
def setRect(self, x, y, w, z)
and
def getXposition(self)
I hope that works.
-Sean Berry
On Dec 26, 2007 2:04 AM, <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> First of all,merry Xmas!
>
> I w
Hi everyone,
First of all,merry Xmas!
I would like to ask about the virtual attributes of pygame.Rect (I
mean: top, left,centerx...and so on)
I have 2 classes, board() and square(). At class Square I have some
methods like:
def setRect(x,y,w,z):
self.rect=pygame.Rect(x,y,w,z)
def getXpos