コード例 #1
0
 public void HideVisual() //외형, 옷 숨기기
 {
     HideAllObject(HairMale);
     HideAllObject(SuitMale);
     FaceMale_OBJ.SetActive(false);
     HideAllObject(HairFemale);
     HideAllObject(SuitFemale);
     FaceFemale_OBJ.SetActive(false);
 }
コード例 #2
0
    public void SetTextureToFace(List <Texture2D> _List, int _Index)   //얼굴 텍스쳐 변경
    {
        for (int i = 0; i < _List.Count; i++)
        {
            if (i == _Index)
            {
                if (Gender == "Male")
                {
                    FaceMale_OBJ.GetComponent <SkinnedMeshRenderer>().material.mainTexture = _List[i];
                }
                else if (Gender == "Female")
                {
                    FaceFemale_OBJ.GetComponent <SkinnedMeshRenderer>().material.mainTexture = _List[i];
                }

                return;
            }
        }
    }
コード例 #3
0
    public void UpdateVisual() //외형, 옷 보이게 하기
    {
        HideVisual();
        //Show select obj
        if (Gender == "Male")
        {
            ShowIndex(HairMale, IndexHair.CurrentIndex);
            ShowIndex(SuitMale, IndexSuit.CurrentIndex);
            SetTextureToFace(FaceMale, IndexFace.CurrentIndex);
            FaceMale_OBJ.SetActive(true);
        }
        else if (Gender == "Female")
        {
            ShowIndex(HairFemale, IndexHair.CurrentIndex);
            ShowIndex(SuitFemale, IndexSuit.CurrentIndex);
            SetTextureToFace(FaceFemale, IndexFace.CurrentIndex);
            FaceFemale_OBJ.SetActive(true);
        }

        //Set Hair Color
        SetHairColor(HairColor, IndexColorHair.CurrentIndex);
    }