コード例 #1
0
    public void onGetAllRoomsDone(AllRoomsEvent eventObj)
    {
        if (eventObj.getResult() == 0)
        {
            string[] roomIds = eventObj.getRoomIds();

            if (roomIds == null)
            {
                RoomSelectionMenu.RoomCount = 0;
                RoomSelectionMenu.Activate();
            }
            else
            {
                RoomSelectionMenu.ActiveRooms = new List <LiveRoomInfoEvent>();
                foreach (string roomId in roomIds)
                {
                    WarpClient.GetInstance().GetLiveRoomInfo(roomId);
                }

                RoomSelectionMenu.RoomCount = roomIds.Length;
            }
        }
        else
        {
            RoomSelectionMenu.RoomCount = 0;
            RoomSelectionMenu.Activate();
        }
        Log("onGetAllRoomsDone : " + eventObj.getResult());
    }
コード例 #2
0
 public void onUserLeft(string user)
 {
     if (LobbyPlayerStats.RoomData != null && LobbyPlayerStats.RoomData.getRoomOwner() == user && user != StaticPlayer.GetInternalPlayer().PlayerName)
     {
         WarpClient.GetInstance().LeaveRoom(LobbyPlayerStats.RoomData.getId());
         LobbyPlayerStats.Hide();
         string roomDeleteCommand = "ROOMDLT";
         RoomSelectionMenu.Show(roomDeleteCommand);
         RoomSelectionMenu.Activate();
     }
     else if (LobbyPlayerStats.RoomData != null && StaticPlayer.GetInternalPlayer().PlayerName == LobbyPlayerStats.RoomData.getRoomOwner())
     {
         int i        = 0;
         int userSeat = -1;
         while (userSeat != -1 && i < 4)
         {
             if (LobbyPlayerStats.RoomProperties["SEAT" + i.ToString()].ToString() == user)
             {
                 userSeat = i;
             }
             i++;
         }
         if (userSeat != -1)
         {
             List <string> removeProperties = new List <string>();
             removeProperties.Add("SEAT" + userSeat.ToString());
             WarpClient.GetInstance().UpdateRoomProperties(LobbyPlayerStats.RoomData.getId(), null, removeProperties);
         }
     }
 }
コード例 #3
0
    private IEnumerator GetAllRooms()
    {
        LoadingScreen.Show();
        MultiplayerListener.ActivePage = 1;
        yield return(null);

        try
        {
            WarpClient.GetInstance().GetAllRooms();
        }
        catch (System.Exception e)
        {
            LogManager.Log(e.ToString());
            RoomSelectionMenu.RoomCount = 0;
            RoomSelectionMenu.Activate();
        }
    }
コード例 #4
0
 public void Timeout()
 {
     RoomSelectionMenu.RoomCount = 0;
     RoomSelectionMenu.Activate();
 }