Beispiel #1
0
 public void Btn_ChangePageIndex(bool add)
 {
     if (PlayerInfo.gameTypes[nowGameType].state == Proto.gameTypeState.wait)
     {
         return;
     }
     nowPageIndex += add ? 1 : -1;
     if (nowPageIndex < 1)
     {
         nowPageIndex = 1;
         return;
     }
     DestroyGamesObj();
     pageIndexText.text = nowPageIndex.ToString();
     Proto.GetGameListReq msg = new Proto.GetGameListReq();
     msg.gameType  = nowGameType;
     msg.state     = nowGameState;
     msg.pageIndex = nowPageIndex;
     SocketClient.SendMsg(Route.connector_main_getGameList, msg);
 }
Beispiel #2
0
 /// <summary>
 /// 选择游戏状态
 /// </summary>
 public void OnGameStateToggleClick(Proto.gameState state)
 {
     nowPageIndex       = 1;
     pageIndexText.text = nowPageIndex.ToString();
     nowGameState       = state;
     DestroyGamesObj();
     if (PlayerInfo.gameTypes[nowGameType].state == Proto.gameTypeState.wait)
     {
         createGameBtn.interactable = false;
         ShowGameTypeText();
         return;
     }
     else
     {
         createGameBtn.interactable = true;
     }
     Proto.GetGameListReq msg = new Proto.GetGameListReq();
     msg.gameType  = nowGameType;
     msg.state     = nowGameState;
     msg.pageIndex = nowPageIndex;
     SocketClient.SendMsg(Route.connector_main_getGameList, msg);
 }