Source code for yracing.weapon.mine.logic

from yracing.weapon.weapon.logic import WeaponLogic, WeaponLogicNetwork


[docs]class MineLogic(WeaponLogic): def __init__(self, mediator, car, cars, wpn_id): WeaponLogic.__init__(self, mediator, car, cars, wpn_id) self.tsk = None
[docs] def fire(self, sfx): WeaponLogic.fire(self, sfx) self.mediator.phys.fire() self.tsk = self.eng.do_later(30, self.mediator.destroy)
[docs] def destroy(self): if self.tsk: self.eng.rm_do_later(self.tsk) WeaponLogic.destroy(self)
[docs]class MineLogicNetwork(WeaponLogicNetwork, MineLogic): pass