Ejemplo n.º 1
0
    def onStateLobby(self):
        trace('onStateLobby')
        playerId = getCurrentPlayerId()
        if playerId is not None and self.currentPlayerId != playerId:
            self.currentPlayerId = playerId
            token.checkVersion()
            token.initializeXvmToken()
            g_websock.send('id/%d' % playerId)
        lobby = getLobbyApp()
        if lobby is not None:
            lobby.loaderManager.onViewLoaded += self.onViewLoaded

        # TODO
        """
Ejemplo n.º 2
0
 def onStateLogin(self):
     trace('onStateLogin')
     if self.currentPlayerId is not None:
         self.currentPlayerId = None
         g_websock.send('id')
         token.clearToken()
Ejemplo n.º 3
0
 def onShowLogin(self, e=None):
     if self.currentPlayerId is not None:
         self.currentPlayerId = None
         g_websock.send('id')
Ejemplo n.º 4
0
 def onShowLobby(self, e=None):
     playerId = getCurrentPlayerId()
     if playerId is not None and self.currentPlayerId != playerId:
         self.currentPlayerId = playerId
         g_websock.send('id/%d' % playerId)
Ejemplo n.º 5
0
 def onShowLogin(self, e=None):
     if self.currentPlayerId is not None:
         self.currentPlayerId = None
         g_websock.send('id')
Ejemplo n.º 6
0
 def onShowLobby(self, e=None):
     playerId = getCurrentPlayerId()
     if playerId is not None and self.currentPlayerId != playerId:
         self.currentPlayerId = playerId
         g_websock.send('id/%d' % playerId)