def update(self, dt): import images for unit in self.units.sprites(): unit.update_while_dropping(dt) self.update_rect(dt, unit) if self.is_dropped(unit): unit.kill() unit.anim = images.blubb_anim() self.battlefield.add_unit(unit)
def on_put_unit(self, unit): import images # TODO: insert unit unit.kill() if unit.team == 1: self.dropping_units.add_unit(unit) else: self.battlefield.add_unit(unit) unit.set_anim(images.blubb_anim())