[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Fwd: [Tutor] A more Pythonic way to do this
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Fwd: [Tutor] A more Pythonic way to do this
- From: Shandy Brown <sjbrown@xxxxxxxxx>
- Date: Wed, 6 Jul 2005 13:38:17 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 06 Jul 2005 13:38:30 -0400
- In-reply-to: <8daabe5605070516351857d85e@mail.gmail.com>
- References: <8daabe5605063015111d32477a@mail.gmail.com> <002b01c57e5e$609fd400$8f5328cf@JSLAPTOP> <8daabe560507011058b30809b@mail.gmail.com> <42C5B888.6000708@po-box.mcgill.ca> <8daabe5605070115567afb6c39@mail.gmail.com> <42C5CC7D.4070705@po-box.mcgill.ca> <8daabe5605070117216b20c08a@mail.gmail.com> <be4fbf9205070206397f35dfed@mail.gmail.com> <8daabe56050705115964075b58@mail.gmail.com> <be4fbf9205070515584d510fd9@mail.gmail.com> <8daabe5605070516351857d85e@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
>
> for each in (enemyship_sprites.sprites()):
> each.rect.centerx = Enemy.initialx
> each.rect.centery = Enemy.initialy
Hi Denise.
This code above is the part where you're using initialx and initialy as
class attributes. You probably want something like
each.rect.centerx = each.initialx
instead.
-sjbrown