[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Re: Odd behaviour of sprites in a list - newbie help please?
OK, a final thanks to everyone, I got it working.
Using rect.copy was a big change as I hadn't realised my cloning of the
sprite would make two instances of the same instead of a new replica. I then
changed my for-loop to alter just the x,y coords of each tail piece. I did
try just moving the last tail to the previous head position, but that
actually ended up more complex as I then needed to remember which piece I
last moved, or i needed to start actually re-positioning items in the list
as well so I always used the last item in the list.
I now need to tidy up my scrappy code structure.
Sent from: http://pygame-users.25799.x6.nabble.com/