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

Re: [pygame] Re: Creating several instances of same image



shandy@geeky.net wrote:

def goto (self, position):
# dunno if move is the right method
self.rect.move(position)

You probably want move_ip(), not move()

That will move it "in place"

-sjbrown



I wasn't sure...

i just tried it and actually i wanted to do

self.rect.left, self.rect.top = pos
or

def goto (self, x, y):
self.rect.left, self.rect.top = x, y

luckily it doesn't matter in this case, but it would have bitten me. I've never used the rect's 'til now...