Exemple #1
0
 def _player_select_action(self, controller):
     pos = controller.pos()
     if controller.button_a and scene.contains(HOST_BOUNDS, pos):
         return Lobby()
     elif controller.button_a and scene.contains(GUEST_BOUNDS, pos):
         return Login()
     return self
 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
Exemple #3
0
 def action(self, controller):
     pos = controller.pos()
     for i, bounds in enumerate(WORLDS_BOUNDS):
         if controller.button_a and scene.contains(bounds, pos):
             self.client.send(i)
             s = Battle(self.client, self.player_id, i)
             s.server = self.server
             return s
     return self
Exemple #4
0
 def action(self, controller):
     if controller.button_a and scene.contains(NEXT_BOUNDS, controller.pos()):
         self.client.send(CHARACTER_SELECT)
         return HostCharacterSelect(self.server, self.client)
     self.ip_list = self.client.send(None) 
     return self
Exemple #5
0
 def _start_menu_action(self, controller):
     pos = controller.pos()
     if controller.button_a and scene.contains(START_BOUNDS, pos):
         self.mode = PLAYER_SELECT
     return self