def MakeScreenObject(game, vals, id=None): if vals["is_alive"] == False: return None #print "make object" #return obj = None type = vals["type"] if type == "AsteroidObject": obj = Asteroid.AsteroidObject(game, id) if type == "ShipObject": obj = Ship.ShipObject(game, id) if type == "BulletObject": obj = Bullet.BulletObject(None, game) LoadScreenObject(obj, vals) return obj
def shoot(self): if self.time_reload <= 0: self.time_reload = 200 # TODO move this value out to a global constant Bullet.BulletObject(self)