|
@@ -37,7 +37,8 @@ namespace MetaClient
|
|
|
public GameObject ziDingYiBtn;
|
|
|
[Header("衣服界面")]
|
|
|
public GameObject clothView;
|
|
|
-
|
|
|
+ [Header("饰品界面")]
|
|
|
+ public GameObject ornamentsView;
|
|
|
[Header("左边界面")]
|
|
|
public GameObject leftView;
|
|
|
|
|
@@ -103,6 +104,12 @@ namespace MetaClient
|
|
|
//[SerializeField]
|
|
|
private IDataTable<DRCustomBody> _bodydata;
|
|
|
private IDataTable<DRCustomFace> _facedata;
|
|
|
+
|
|
|
+ public void ChangeECustomStyple(ECustomStyple ec) {
|
|
|
+ eCustomStyple = ec;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
protected override void OnOpen(object userData)
|
|
|
{
|
|
|
|
|
@@ -298,6 +305,8 @@ namespace MetaClient
|
|
|
histroyextra = false;
|
|
|
return;
|
|
|
}
|
|
|
+ int index = this.histroy.Count;
|
|
|
+ index = eCustomStyple == ECustomStyple.Ornament ? index - 1 : index;
|
|
|
switch (this.histroy.Count)
|
|
|
{
|
|
|
case 0:
|
|
@@ -429,6 +438,11 @@ namespace MetaClient
|
|
|
case ECustomStyple.NieLian:
|
|
|
BackView_Extra(nieLianView, _bo);
|
|
|
break;
|
|
|
+ case ECustomStyple.Ornament:
|
|
|
+ // BackView_Extra(ornamentsView, _bo);
|
|
|
+ BackView_Extra(clothView, _bo);
|
|
|
+ ornamentsView.SetActive(false);
|
|
|
+ break;
|
|
|
}
|
|
|
//toolView.SetActive(true);
|
|
|
//bodyView.SetActive(false);
|
|
@@ -545,10 +559,11 @@ namespace MetaClient
|
|
|
case ECustomStyple.None:
|
|
|
break;
|
|
|
case ECustomStyple.NieLian:
|
|
|
- GameObject _nieLianList = nieLianView.transform.GetChild(0).gameObject;
|
|
|
- _nieLianList.SetActive(false);
|
|
|
- GameObject _nieLianXX = nieLianView.transform.GetChild(2).gameObject;
|
|
|
- _nieLianXX.SetActive(true);
|
|
|
+ XXListShow(nieLianView);
|
|
|
+ //GameObject _nieLianList = nieLianView.transform.GetChild(0).gameObject;
|
|
|
+ //_nieLianList.SetActive(false);
|
|
|
+ //GameObject _nieLianXX = nieLianView.transform.GetChild(2).gameObject;
|
|
|
+ //_nieLianXX.SetActive(true);
|
|
|
//if (!zidingyi)
|
|
|
//{
|
|
|
// ZiDingYiNeiLian(eCustomStyple, id, _nieLianXX.transform.GetChild(0).gameObject);
|
|
@@ -557,10 +572,11 @@ namespace MetaClient
|
|
|
CreateNieLianImg(id, zidingyi,isColor);
|
|
|
break;
|
|
|
case ECustomStyple.Body:
|
|
|
- GameObject _bodyList = bodyView.transform.GetChild(0).gameObject;
|
|
|
- _bodyList.SetActive(false);
|
|
|
- GameObject _bodyListXX =bodyView.transform.GetChild(2).gameObject;
|
|
|
- _bodyListXX.SetActive(true);
|
|
|
+ XXListShow(bodyView);
|
|
|
+ //GameObject _bodyList = bodyView.transform.GetChild(0).gameObject;
|
|
|
+ //_bodyList.SetActive(false);
|
|
|
+ //GameObject _bodyListXX =bodyView.transform.GetChild(2).gameObject;
|
|
|
+ //_bodyListXX.SetActive(true);
|
|
|
//if (!zidingyi)
|
|
|
//{
|
|
|
// ZiDingYiBody(eCustomStyple, id, _bodyListXX.transform.GetChild(0).gameObject);
|
|
@@ -569,19 +585,44 @@ namespace MetaClient
|
|
|
CreateBodyImg(id, zidingyi,isColor);
|
|
|
break;
|
|
|
case ECustomStyple.Cloth:
|
|
|
- GameObject _clothList = clothView.transform.GetChild(0).gameObject;
|
|
|
- _clothList.SetActive(false);
|
|
|
- GameObject _clothListXX = clothView.transform.GetChild(2).gameObject;
|
|
|
- _clothListXX.SetActive(true);
|
|
|
+ XXListShow(clothView);
|
|
|
+ //GameObject _clothList = clothView.transform.GetChild(0).gameObject;
|
|
|
+ //_clothList.SetActive(false);
|
|
|
+ //GameObject _clothListXX = clothView.transform.GetChild(2).gameObject;
|
|
|
+ //_clothListXX.SetActive(true);
|
|
|
//if (!zidingyi)
|
|
|
//{
|
|
|
// ZiDingYiCloth(eCustomStyple, id, _clothListXX.transform.GetChild(0).gameObject);
|
|
|
// return;
|
|
|
//}
|
|
|
- //CreateClothImg(id, zidingyi,isColor);
|
|
|
+ CreateClothImg(id, zidingyi,isColor);
|
|
|
+ break;
|
|
|
+ case ECustomStyple.Ornament:
|
|
|
+ XXListShow(ornamentsView);
|
|
|
+ //GameObject _Ornament = ornamentsView.transform.GetChild(0).gameObject;
|
|
|
+ //_Ornament.SetActive(false);
|
|
|
+ //GameObject _OrnamentXX = ornamentsView.transform.GetChild(2).gameObject;
|
|
|
+ //_OrnamentXX.SetActive(true);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void XXListShow(GameObject obj)
|
|
|
+ {
|
|
|
+ obj.transform.GetChild(0).gameObject.SetActive(false);
|
|
|
+ obj.transform.GetChild(2).gameObject.SetActive(true);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//public Action ActionFun() {
|
|
|
|
|
|
// return null;
|
|
@@ -685,6 +726,10 @@ namespace MetaClient
|
|
|
|
|
|
GameObject _objPar = clothView.transform.GetChild(2).GetChild(0).gameObject;
|
|
|
RemoveAllChildren(_objPar);
|
|
|
+ //if (parentid == 8)
|
|
|
+ //{
|
|
|
+
|
|
|
+ //}
|
|
|
//等有服装时改为服装
|
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
@@ -721,7 +766,51 @@ namespace MetaClient
|
|
|
}
|
|
|
ChangeListBotton(_objPar);
|
|
|
}
|
|
|
+ public void CreateOrnamentImg(int parentid, bool ziDingYi, bool isColor)
|
|
|
+ {
|
|
|
+
|
|
|
+ GameObject _objPar = ornamentsView.transform.GetChild(2).GetChild(0).gameObject;
|
|
|
+ RemoveAllChildren(_objPar);
|
|
|
+ //if (parentid == 8)
|
|
|
+ //{
|
|
|
|
|
|
+ //}
|
|
|
+ //等有服装时改为服装
|
|
|
+ IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
|
+ _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
|
+ int cengji = ziDingYi ? 0 : 1;
|
|
|
+ //if (ziDingYi)
|
|
|
+ //{
|
|
|
+
|
|
|
+ // CreateZDYFun(parentid, _objPar, ziDingYiBtn);
|
|
|
+
|
|
|
+ // //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
+ // //_obj.transform.SetParent(_objPar.transform);
|
|
|
+ // //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
+ // //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
+
|
|
|
+
|
|
|
+ // //_uICustomBtn.id = parentid;
|
|
|
+ // //_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
|
+ // //_obj.SetActive(true);
|
|
|
+
|
|
|
+ //}
|
|
|
+ //if (isColor)
|
|
|
+ //{
|
|
|
+ // CreateColFun(parentid, _objPar, colItem);
|
|
|
+
|
|
|
+ //}
|
|
|
+ DRCustomBody[] dRCustomBodies = _bodydata.GetAllDataRows();
|
|
|
+ for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
|
+ {
|
|
|
+ Debug.Log(dRCustomBodies[i].Id);
|
|
|
+ if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
|
|
|
+ {
|
|
|
+ CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body, dRCustomBodies[i].IsActive);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ChangeListBotton(_objPar);
|
|
|
+ }
|
|
|
private void CreateZDYFun(int parentid,GameObject _objPar,GameObject _clone)
|
|
|
{
|
|
|
GameObject _obj = GameObject.Instantiate(_clone);
|
|
@@ -811,6 +900,10 @@ namespace MetaClient
|
|
|
_obj.GetComponent<RectTransform>().offsetMin = new Vector2(_x, _y);
|
|
|
}
|
|
|
|
|
|
+ //public void OrnamentListOpen()
|
|
|
+ //{
|
|
|
+ // HistoryAdd(ECustomStyple.Ornament+"");
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
|
@@ -939,7 +1032,8 @@ namespace MetaClient
|
|
|
None,
|
|
|
NieLian,
|
|
|
Body,
|
|
|
- Cloth
|
|
|
+ Cloth,
|
|
|
+ Ornament,
|
|
|
}
|
|
|
public enum EButtonStyple
|
|
|
{
|