def __init__(self): MultiImage.__init__(self) if conf.game is None: game = Game() conf.game = game game.sprites.add(self) game.step() self.turn_off()
def flip(self): key = 'bulb_%s.png' % self.state MultiImage.flip(self, key) conf.game.set_background(color=self.bgcolor)