There may be a much better way to manage artillery.
rhodri at wildebst.demon.co.uk
Mon May 11 01:48:25 CEST 2009
On Mon, 11 May 2009 00:06:34 +0100, Tobiah <toby at tobiah.org> wrote:
> I wanted the bullets to be responsible for destroying
> themselves, but a little Googling brought me to points
> about dangling references and how an object is not allowed
> (nor does it seem to have the means) to destroy itself.
> That's why I made this wrapper class for all of the bullets.
An object can, however, erase its representation from the
screen and tell whatever control system is keeping track
of objects to forget about it. Once the last reference to
the object is deleted, the object will be garbage collected.
What framework are you writing your game in? Pygame has
facilities for handling this sort of thing fairly
Rhodri James *-* Wildebeeste Herder to the Masses
More information about the Python-list