Exemplo n.º 1
0
        private void ShowCharacterCreate()
        {
            preview_CharacterData = new UI_Character();
            preview_CharacterData.CharacterName = "";

            create_FinishButton.interactable = false;
            create_NameInput.text            = "";
            create_MaleButton.interactable   = false;
            create_FemaleButton.Select();
            create_EyeShapeSlider.value = 0;
            create_EyeTypeSlider.value  = 0;
            create_EyeColorButton.GetComponent <Image>().color = preview_CharacterData.CharacterEyeColor;
            create_EyeColorPicker.GetComponent <ColorPicker>().CurrentColor = preview_CharacterData.CharacterEyeColor;
            create_EyeColorPicker.SetActive(false);
            create_HairFrontSlider.value = 0;
            create_HairBackSlider.value  = 0;
            create_HairColorButton.GetComponent <Image>().color = preview_CharacterData.CharacterHairColor;
            create_HairColorPicker.GetComponent <ColorPicker>().CurrentColor = preview_CharacterData.CharacterHairColor;
            create_HairColorPicker.SetActive(false);

            BuildSelectPreview();

            select_UIRoot.SetActive(false);
            create_UIRoot.SetActive(true);
        }
        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);
        }
Exemplo n.º 3
0
        private void SelectCharacter(int index)
        {
            preview_CharacterData = CharacterList.Characters[index];
            SelectedCharacter     = index;

            select_CharacterListParent.transform.GetChild(index + 1).GetComponent <Button>().Select();

            select_EnterWorldButton.interactable      = true;
            select_DeleteCharacterButton.interactable = true;

            BuildSelectPreview();
        }
Exemplo n.º 4
0
        public void net_lobbyAskCreateCharacter(UI_Character c)
        {
            GC2S_AskCreateCharacter Message = new GC2S_AskCreateCharacter();

            Message.PlayerID           = e.getWorld().Self_ID;
            Message.CharacterName      = c.CharacterName;
            Message.CharacterGender    = 1;
            Message.CharacterEyeType   = c.CharacterEyeType;
            Message.CharacterEyeShape  = c.CharacterEyeShape;
            Message.CharacterEyeColor  = c.CharacterEyeColor;
            Message.CharacterFrontHair = c.CharacterFrontHair;
            Message.CharacterBackHair  = c.CharacterBackHair;
            Message.CharacterHairColor = c.CharacterHairColor;

            Client.Send(OPCodes.GC2S_AskCreateCharacter, Message);
        }