def __init__(self): Entity.__init__(self) self._time_interval = 0 self.graphic = Spritemap('EntitySheet.png', 40, 20, self.on_animation_end) self.graphic.add('Stopped', [0]) self.graphic.add('Blinking', list(range(10)), 24) Input.define('UP', Key.W, Key.UP) Input.define('DOWN', Key.S, Key.DOWN) Input.define('LEFT', Key.A, Key.LEFT) Input.define('RIGHT', Key.D, Key.RIGHT) self.type = 'GameEntity' self.graphic.play('Blinking')
def __init__(self, x=0, y=0, callback=None, *args, **kwargs): Entity.__init__(self, x, y) self._map = None self._callback = callback self._args = args self._kwargs = kwargs