Ejemplo n.º 1
0
class GestCharacterSelect(object):

    def __init__(self, client):
        self.client = client
        self.scene = CharacterSelect(client)

    def draw(self):
        self.scene.draw()

    def action(self, controller):
        self.scene.action(controller)
        mode = self.client.send(None)
        if STAGE_SELECT == mode:
            return LoadingStageSelect(self.client, self.scene.player_id)
        return self
Ejemplo n.º 2
0
class HostCharacterSelect(object):

    def __init__(self, server, client):
        self.server = server
        self.client = client
        self.next = Text("Next", fontsize=160, color=BLACK)
        self.scene = CharacterSelect(client)

    def draw(self):
        self.next.draw(NEXT_BOUNDS)
        self.scene.draw()

    def action(self, controller):
        self.scene.action(controller)
        pos = controller.pos()
        if controller.button_a and scene.contains(NEXT_BOUNDS, pos):
            self.client.send(STAGE_SELECT)
            return StageSelect(self.server, self.client, self.scene.player_id)
        return self