public void ui_lobby_OnCharacterList(S2GC_CharacterListResponse list) { UI_CharacterList newList = new UI_CharacterList(); newList.LobbyNumCharacters = list.Data.LobbyNumCharacters; newList.LobbyMaxCharacters = list.Data.LobbyMaxCharacters; if (newList.LobbyNumCharacters > 0) { for (int i = 0; i < list.Data.Characters.Count; i++) { UI_Character newChar = new UI_Character(); newChar.CharacterIndex = list.Data.Characters[i].CharacterIndex; newChar.CharacterName = list.Data.Characters[i].CharacterName; newChar.CharacterGender = list.Data.Characters[i].CharacterGender; newChar.CharacterEyeShape = list.Data.Characters[i].CharacterEyeShape; newChar.CharacterEyeType = list.Data.Characters[i].CharacterEyeType; newChar.CharacterEyeColor = list.Data.Characters[i].CharacterEyeColor; newChar.CharacterFrontHair = list.Data.Characters[i].CharacterFrontHair; newChar.CharacterBackHair = list.Data.Characters[i].CharacterBackHair; newChar.CharacterHairColor = list.Data.Characters[i].CharacterHairColor; newList.Characters.Add(newChar); } } if (LoginUI_Root.activeSelf) { LoginUI_Root.SetActive(false); } if (!LobbyUI_Root.activeSelf) { LobbyUI_Root.SetActive(true); } Lobby.UpdateCharacterSelect(newList); }
private void net_onCharacterListResponse(NetworkMessage netMsg) { S2GC_CharacterListResponse Message = netMsg.ReadMessage <S2GC_CharacterListResponse>(); e.getUI().ui_lobby_OnCharacterList(Message); }