|
@@ -81,7 +81,10 @@ namespace MetaClient
|
|
[Header("历史记录用于回退")]
|
|
[Header("历史记录用于回退")]
|
|
[SerializeField]
|
|
[SerializeField]
|
|
private List<string> histroy;
|
|
private List<string> histroy;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //用来判断是否是例如颜色框 滑块 调色板等额外的弹窗;
|
|
|
|
+ private bool histroyextra;
|
|
|
|
+
|
|
private int part = 0;
|
|
private int part = 0;
|
|
|
|
|
|
|
|
|
|
@@ -154,10 +157,104 @@ namespace MetaClient
|
|
Debug.Log(scrollbar.value);
|
|
Debug.Log(scrollbar.value);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void BackBtnFun()
|
|
|
|
+ {
|
|
|
|
+ if (histroyextra)
|
|
|
|
+ {
|
|
|
|
+ BackExtraFun();
|
|
|
|
+ histroyextra = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ switch (this.histroy.Count)
|
|
|
|
+ {
|
|
|
|
+ case 0:
|
|
|
|
+ Debug.Log("返回上一层");
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ Debug.Log("返回选择捏脸/身体/服装");
|
|
|
|
+ histroy.RemoveAt(histroy.Count - 1);
|
|
|
|
+ Back_OneFun();
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ Debug.Log("进入选择界面");
|
|
|
|
+ histroy.RemoveAt(histroy.Count - 1);
|
|
|
|
+ Back_TwoFun();
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ Debug.Log("进入自定义或颜色");
|
|
|
|
+ histroy.RemoveAt(histroy.Count - 1);
|
|
|
|
+ Back_ThreeFun();
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ void Back_OneFun() {
|
|
|
|
+ ViewSetFalse();
|
|
|
|
+ toolView.SetActive(true);
|
|
|
|
+ //toolView.SetActive(true);
|
|
|
|
+ //bodyView.SetActive(false);
|
|
|
|
+ //nieLianView.SetActive(false);
|
|
|
|
+ //clothView.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void BackExtraFun()
|
|
|
|
+ {
|
|
|
|
+ rightView.SetActive(true);
|
|
|
|
+ scrollbar.gameObject.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+ void ViewSetFalse()
|
|
|
|
+ {
|
|
|
|
+ toolView.SetActive(false);
|
|
|
|
+ bodyView.SetActive(false);
|
|
|
|
+ nieLianView.SetActive(false);
|
|
|
|
+ clothView.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void BackView_Extra(GameObject _obj,bool _bo) {
|
|
|
|
+ ViewSetFalse();
|
|
|
|
+ _obj.SetActive(_bo);
|
|
|
|
+ ViewSetChildTrue(_obj,_bo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void ViewSetChildTrue(GameObject _obj,bool _bo)
|
|
|
|
+ {
|
|
|
|
+ _obj.transform.GetChild(0).gameObject.SetActive(_bo);
|
|
|
|
+ _obj.transform.GetChild(0).gameObject.SetActive(_bo);
|
|
|
|
+ _obj.transform.GetChild(2).gameObject.SetActive(!_bo);
|
|
|
|
+ }
|
|
|
|
+ void Back_TwoFun()
|
|
|
|
+ {
|
|
|
|
+ int _choose = int.Parse(histroy[1]);
|
|
|
|
+ switch ((ECustomStyple)_choose)
|
|
|
|
+ {
|
|
|
|
+ case ECustomStyple.Body:
|
|
|
|
+ BackView_Extra(bodyView, true);
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.Cloth:
|
|
|
|
+ BackView_Extra(clothView, true);
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.None:
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.NieLian:
|
|
|
|
+ BackView_Extra(nieLianView, true);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ //toolView.SetActive(true);
|
|
|
|
+ //bodyView.SetActive(false);
|
|
|
|
+ //nieLianView.SetActive(false);
|
|
|
|
+ //clothView.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+ void Back_ThreeFun()
|
|
|
|
+ {
|
|
|
|
+ toolView.SetActive(true);
|
|
|
|
+ bodyView.SetActive(false);
|
|
|
|
+ nieLianView.SetActive(false);
|
|
|
|
+ clothView.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 修改滑块
|
|
/// 修改滑块
|
|
/// </summary>
|
|
/// </summary>
|
|
-
|
|
|
|
public void SetValue(int _part,ECustomStyple eCustomStyple)
|
|
public void SetValue(int _part,ECustomStyple eCustomStyple)
|
|
{
|
|
{
|
|
|
|
|
|
@@ -181,8 +278,8 @@ namespace MetaClient
|
|
// return;
|
|
// return;
|
|
//}
|
|
//}
|
|
whitebg.SetActive(true);
|
|
whitebg.SetActive(true);
|
|
-
|
|
|
|
|
|
|
|
|
|
+ this.eCustomStyple = eCustomStyple;
|
|
|
|
|
|
|
|
|
|
//ECustomStyple _eCustomStyple = (ECustomStyple)int.Parse(_objects[0].ToString());
|
|
//ECustomStyple _eCustomStyple = (ECustomStyple)int.Parse(_objects[0].ToString());
|
|
@@ -290,13 +387,18 @@ namespace MetaClient
|
|
//等有捏脸表时改为捏脸
|
|
//等有捏脸表时改为捏脸
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
- int cengji = ziDingYi ? 0 : 1;
|
|
|
|
- if (ziDingYi)
|
|
|
|
- {
|
|
|
|
- GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
- _obj.transform.SetParent(_objPar.transform);
|
|
|
|
- UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
- ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
|
|
+ int cengji = ziDingYi ?1:0;
|
|
|
|
+ if (!ziDingYi)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ CreateZDYFun(parentid, _objPar);
|
|
|
|
+
|
|
|
|
+ //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
+ //_obj.transform.SetParent(_objPar.transform);
|
|
|
|
+ //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
+ //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
+
|
|
|
|
+
|
|
//_uICustomBtn.id =parentid;
|
|
//_uICustomBtn.id =parentid;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_obj.SetActive(true);
|
|
//_obj.SetActive(true);
|
|
@@ -306,7 +408,7 @@ namespace MetaClient
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
{
|
|
{
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
- if (dRCustomBodies[i].ParentStyple == parentid)
|
|
|
|
|
|
+ if (dRCustomBodies[i].ParentStyple == parentid&&dRCustomBodies[i].Cengji==cengji)
|
|
{
|
|
{
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
}
|
|
}
|
|
@@ -321,13 +423,18 @@ namespace MetaClient
|
|
//等有服装时改为服装
|
|
//等有服装时改为服装
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
- int cengji = ziDingYi ? 0 : 1;
|
|
|
|
- if (ziDingYi)
|
|
|
|
|
|
+ int cengji = ziDingYi ?1:0;
|
|
|
|
+ if (!ziDingYi)
|
|
{
|
|
{
|
|
- GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
- _obj.transform.SetParent(_objPar.transform);
|
|
|
|
- UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
- ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
|
|
+
|
|
|
|
+ CreateZDYFun(parentid, _objPar);
|
|
|
|
+
|
|
|
|
+ //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
+ //_obj.transform.SetParent(_objPar.transform);
|
|
|
|
+ //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
+ //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
+
|
|
|
|
+
|
|
//_uICustomBtn.id = parentid;
|
|
//_uICustomBtn.id = parentid;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_obj.SetActive(true);
|
|
//_obj.SetActive(true);
|
|
@@ -337,7 +444,7 @@ namespace MetaClient
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
{
|
|
{
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
- if (dRCustomBodies[i].ParentStyple == parentid)
|
|
|
|
|
|
+ if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
|
|
{
|
|
{
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
}
|
|
}
|
|
@@ -345,7 +452,13 @@ namespace MetaClient
|
|
// ChangeListBotton(_objPar);
|
|
// ChangeListBotton(_objPar);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ private void CreateZDYFun(int parentid,GameObject _objPar)
|
|
|
|
+ {
|
|
|
|
+ GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
+ _obj.transform.SetParent(_objPar.transform);
|
|
|
|
+ UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
+ ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
+ }
|
|
|
|
|
|
public void ChangeUICustom(UICustomBtn uICustomBtn,int id, ECustomStyple eCustomStyple)
|
|
public void ChangeUICustom(UICustomBtn uICustomBtn,int id, ECustomStyple eCustomStyple)
|
|
{
|
|
{
|
|
@@ -366,13 +479,19 @@ namespace MetaClient
|
|
RemoveAllChildren(_objPar);
|
|
RemoveAllChildren(_objPar);
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
- int cengji = ziDingYi ? 0 : 1;
|
|
|
|
- if (ziDingYi)
|
|
|
|
|
|
+ int cengji = ziDingYi ?1:0;
|
|
|
|
+ if (!ziDingYi)
|
|
{
|
|
{
|
|
- GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
- _obj.transform.SetParent(_objPar.transform);
|
|
|
|
- UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
- ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
|
|
+
|
|
|
|
+ CreateZDYFun(parentid, _objPar);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
|
|
|
|
+ //_obj.transform.SetParent(_objPar.transform);
|
|
|
|
+ //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
|
|
|
|
+ //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
|
|
|
|
+
|
|
|
|
+
|
|
//_uICustomBtn.id = parentid;
|
|
//_uICustomBtn.id = parentid;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_uICustomBtn.eCustomStyple = eCustomStyple;
|
|
//_obj.SetActive(true);
|
|
//_obj.SetActive(true);
|
|
@@ -382,7 +501,7 @@ namespace MetaClient
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
for (int i = 0; i < dRCustomBodies.Length; i++)
|
|
{
|
|
{
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
- if (dRCustomBodies[i].ParentStyple == parentid)
|
|
|
|
|
|
+ if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
|
|
{
|
|
{
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
|
|
}
|
|
}
|
|
@@ -528,6 +647,7 @@ namespace MetaClient
|
|
Scroll,
|
|
Scroll,
|
|
TiaoSe,
|
|
TiaoSe,
|
|
NorButton,
|
|
NorButton,
|
|
|
|
+ Back
|
|
}
|
|
}
|
|
public enum ENieLianStyple {
|
|
public enum ENieLianStyple {
|
|
None,
|
|
None,
|