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

Re: [pygame] A bunch of newbie questions



hi all,

thanks a bunch for the answers - I have learnt much, and everything seems to work.
I have an extra question, though. Albeit much more simple:
I have an object with a gravitational method that should affect all objects of one type in the game.  How do I pass that method to a sprite group?
(like deadStar.grav(object), being object a group of sprites - Python does not like it since the objects lack self.x, self.y before they are instantiated).

Cheers, and thanks for the help,

Naranjito

On 11/27/07, Dmitrii 'Mamut' Dimandt <dmitriid@xxxxxxxxx> wrote:

> if game_mode == "player_alive":
>     handle_input()
>     move_player()
>     if player.is_killed():
>         if number_of_lives == 0:
I'd change it to, possibly, if player.number_of_lives , but that depends
on the actual game design