Ejemplo n.º 1
0
    def __init__(self, game):
        Player.__init__(self)

        self._game = game
        self._avatar = game.new_avatar()
        app = clientapp.singleton()
        self._controller = input.Controller(app.window, self._avatar)
        self._controller.listen()
Ejemplo n.º 2
0
    def __init__(self, game):
        Avatar.__init__(self, game)

        app = clientapp.singleton()

        # get rid of pyglet from this class!
        img = pyglet.resource.image('ball.png')
        self.sprite = app.renderer.get_sprite(img, self.get_position())