|
@@ -54,6 +54,11 @@ namespace MetaClient
|
|
[Header("滑块")]
|
|
[Header("滑块")]
|
|
public Scrollbar scrollbar;
|
|
public Scrollbar scrollbar;
|
|
|
|
|
|
|
|
+
|
|
|
|
+ [Header("颜色选择界面")]
|
|
|
|
+ public GameObject colorView;
|
|
|
|
+
|
|
|
|
+
|
|
// [Header("顺序")]
|
|
// [Header("顺序")]
|
|
private EButtonShunXu eButtonShunXu = EButtonShunXu.None;
|
|
private EButtonShunXu eButtonShunXu = EButtonShunXu.None;
|
|
|
|
|
|
@@ -81,7 +86,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;
|
|
|
|
|
|
|
|
|
|
@@ -155,10 +163,121 @@ namespace MetaClient
|
|
GameEntry.Event.Fire(this, CustomRoleBodyEventArgs.Create(part, new Vector3(scrollbar.value, 0, 0)));
|
|
GameEntry.Event.Fire(this, CustomRoleBodyEventArgs.Create(part, new Vector3(scrollbar.value, 0, 0)));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ 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(true);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ Debug.Log("进入自定义或颜色");
|
|
|
|
+ // histroy.RemoveAt(histroy.Count - 1);
|
|
|
|
+ Back_ThreeFun();
|
|
|
|
+ histroy.RemoveAt(histroy.Count - 1);
|
|
|
|
+ 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(bool _bo)
|
|
|
|
+ {
|
|
|
|
+ // int _choose = int.Parse(histroy[1]);
|
|
|
|
+ // switch ((ECustomStyple)_choose)
|
|
|
|
+ switch(eCustomStyple)
|
|
|
|
+ {
|
|
|
|
+ case ECustomStyple.Body:
|
|
|
|
+ BackView_Extra(bodyView,_bo);
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.Cloth:
|
|
|
|
+ BackView_Extra(clothView, _bo);
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.None:
|
|
|
|
+ break;
|
|
|
|
+ case ECustomStyple.NieLian:
|
|
|
|
+ BackView_Extra(nieLianView, _bo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ //toolView.SetActive(true);
|
|
|
|
+ //bodyView.SetActive(false);
|
|
|
|
+ //nieLianView.SetActive(false);
|
|
|
|
+ //clothView.SetActive(false);
|
|
|
|
+ }
|
|
|
|
+ void Back_ThreeFun()
|
|
|
|
+ {
|
|
|
|
+ string[] _strArrary = histroy[histroy.Count - 1].Split(',');
|
|
|
|
+ if (_strArrary[0] == "Color")
|
|
|
|
+ {
|
|
|
|
+ colorView.SetActive(false);
|
|
|
|
+ rightView.SetActive(true);
|
|
|
|
+ }
|
|
|
|
+ else if (_strArrary[0] == "ziDingyi")
|
|
|
|
+ {
|
|
|
|
+ int _chooseId = int.Parse(_strArrary[1]);
|
|
|
|
+ ClickBtnFun(eCustomStyple, _chooseId, false);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Debug.Log("缺少当前情况需要添加>>>>");
|
|
|
|
+ }
|
|
|
|
+ //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)
|
|
{
|
|
{
|
|
|
|
|
|
@@ -183,8 +302,8 @@ namespace MetaClient
|
|
// return;
|
|
// return;
|
|
//}
|
|
//}
|
|
whitebg.SetActive(true);
|
|
whitebg.SetActive(true);
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ scrollbar.gameObject.SetActive(false);
|
|
|
|
+ this.eCustomStyple = eCustomStyple;
|
|
|
|
|
|
|
|
|
|
//ECustomStyple _eCustomStyple = (ECustomStyple)int.Parse(_objects[0].ToString());
|
|
//ECustomStyple _eCustomStyple = (ECustomStyple)int.Parse(_objects[0].ToString());
|
|
@@ -292,13 +411,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);
|
|
@@ -308,7 +432,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);
|
|
}
|
|
}
|
|
@@ -323,13 +447,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);
|
|
@@ -339,7 +468,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);
|
|
}
|
|
}
|
|
@@ -347,7 +476,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)
|
|
{
|
|
{
|
|
@@ -368,13 +503,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);
|
|
@@ -384,7 +525,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);
|
|
}
|
|
}
|
|
@@ -530,6 +671,7 @@ namespace MetaClient
|
|
Scroll,
|
|
Scroll,
|
|
TiaoSe,
|
|
TiaoSe,
|
|
NorButton,
|
|
NorButton,
|
|
|
|
+ Back
|
|
}
|
|
}
|
|
public enum ENieLianStyple {
|
|
public enum ENieLianStyple {
|
|
None,
|
|
None,
|