示例#1
0
 private void initUserPanel(PreGameSlotInfo p, int index)
 {
     if (p.type != PreGameSlotType.Empty)
     {
         playerSlots [index].setUserPanel(p.playerInfo.iconNumber, p.playerInfo.username, p.isReady);
     }
     else
     {
         playerSlots [index].startClearPanel();
     }
 }
        private void initPlayerInfos()
        {
            AccountInfoPacket ac = ClientUIOverlord.getCurrentAcountInfo();

            localInfo = new PlayerInfo()
            {
                username = ac.Username, iconNumber = int.Parse(ac.Properties[AlbotDictKeys.icon])
            };
            p2Slot = new PreGameSlotInfo()
            {
                slotID = 1, playerInfo = localInfo
            };
        }
示例#3
0
        private void insertBots()
        {
            if (getNPCPlayers().Count == 0)
            {
                return;
            }

            TournamentPlayer bot     = getNPCPlayers()[0];
            PreGameSlotInfo  botSlot = new PreGameSlotInfo()
            {
                slotID = 1, playerInfo = LocalTrainingBots.StandardTrainingBotInfo, isReady = true, type = PreGameSlotType.TrainingBot
            };

            thePregame.updateSlotType(botSlot, extraHost);
        }
示例#4
0
        private void activateSinglePlayerLobby()
        {
            gameSelectionLobby.SetActive(false);
            singlePlayerLobby.SetActive(true);

            PreGameBaseLobby  lobby       = singlePlayerLobby.GetComponent <PreGameBaseLobby>();
            AccountInfoPacket currentUser = ClientUI.ClientUIOverlord.getCurrentAcountInfo();


            PlayerInfo playerInfo = new PlayerInfo()
            {
                iconNumber = int.Parse(currentUser.Properties[AlbotDictKeys.icon]), username = currentUser.Username
            };

            PreGameSlotInfo[] players = new PreGameSlotInfo[] {
                new PreGameSlotInfo()
                {
                    playerInfo = playerInfo, slotID = 0
                },
                new PreGameSlotInfo()
                {
                    playerInfo = playerInfo, slotID = 1, isReady = true
                }
            };

            PreGameSpecs specs = new PreGameSpecs()
            {
                type = gameMap.type, hostName = ClientUIOverlord.getCurrentAcountInfo().Username
            };
            PreGameRoomMsg roomInfo = new PreGameRoomMsg()
            {
                players = players, specs = specs
            };

            AnneHacks.startSinglePlayerLobby(lobby, gameMap);
            lobby.initPreGameLobby(gameMap.picture, roomInfo);
        }