def destroy(self): self.car = self.cars = None try: self.notify('on_weapon_destroyed', self.mediator) except TypeError: info('empty observers') # it may happen on pause/resume LogicColleague.destroy(self)
def destroy(self): self.camera = None if self.weapon: self.weapon = self.weapon.destroy() f_wpn = [wpn for wpn in self.fired_weapons if wpn] list(map(lambda wpn: wpn.destroy(), f_wpn)) self.fired_weapons = [] LogicColleague.destroy(self) ComputerProxy.destroy(self)
def destroy(self): cwp = self.closest_wp boxes = cwp.weapon_boxes boxes.remove(self.mediator) cwp.weapon_boxes = boxes if cwp.weapon_boxes: pos = cwp.weapon_boxes[-1].gfx.model.get_pos() pos = Vec(pos.x, pos.y, pos.z) cwp.node.set_pos(pos) else: pos = cwp.initial_pos pos = Vec(pos.x, pos.y, pos.z) cwp.node.set_pos(pos) self.track_gfx.redraw_wps() self.track_phys = self.track_gfx = self.closest_wp = None LogicColleague.destroy(self)
def destroy(self): self.tuning.detach_obs(self.on_tuning_sel) self.props = self.ranking = self.tuning = self.race = None LogicColleague.destroy(self)