In this case, we're keeping a list of bullets to avoid creating/destroying lots of bullets. Less overhead. Also, having the garbage collection kick in during some action would be obnoxious.
The bullet could have a class variable timeToLive that is decremented during its update(). When timeToLive == 0, then remove the bullet from the live queue and put it into the waiting queue.
class Bullet: def __init__(self,**options): ## Regular options like position and speed, then: self.pattern = options.get("pattern","FancyRocketThing") self.pattern_timer = 0 def Go(self): self.patern_timer += 1 if self.pattern == "FancyRocketThing": if self.pattern_timer >= 10: self.DoSomethingCool()
Kris