|
@@ -66,7 +66,7 @@ namespace MetaClient
|
|
[Header("颜色演示预制体")]
|
|
[Header("颜色演示预制体")]
|
|
public GameObject colItem;
|
|
public GameObject colItem;
|
|
|
|
|
|
- private bool hasColorChoose = false;
|
|
|
|
|
|
+ public bool hasColorChoose = false;
|
|
public float tween_leftMax = 0;
|
|
public float tween_leftMax = 0;
|
|
public float tween_leftMin = -250;
|
|
public float tween_leftMin = -250;
|
|
|
|
|
|
@@ -95,17 +95,22 @@ namespace MetaClient
|
|
private int id = -1;
|
|
private int id = -1;
|
|
private GameObject nowPickOnImg=null;
|
|
private GameObject nowPickOnImg=null;
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
private Vector3 colorV3 = new Vector3(0, 0, 0);
|
|
private Vector3 colorV3 = new Vector3(0, 0, 0);
|
|
//[Header("接受到的数据")]
|
|
//[Header("接受到的数据")]
|
|
//[SerializeField]
|
|
//[SerializeField]
|
|
private IDataTable<DRCustomBody> _bodydata;
|
|
private IDataTable<DRCustomBody> _bodydata;
|
|
|
|
+ private IDataTable<DRCustomFace> _facedata;
|
|
protected override void OnOpen(object userData)
|
|
protected override void OnOpen(object userData)
|
|
{
|
|
{
|
|
|
|
|
|
base.OnOpen(userData);
|
|
base.OnOpen(userData);
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
_bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
-
|
|
|
|
|
|
+ _facedata = GameEntry.DataTable.GetDataTable<DRCustomFace>();
|
|
|
|
+
|
|
}
|
|
}
|
|
public void ColorChange(Vector3 _v3) {
|
|
public void ColorChange(Vector3 _v3) {
|
|
colorV3 = _v3;
|
|
colorV3 = _v3;
|
|
@@ -273,6 +278,7 @@ namespace MetaClient
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
Debug.Log("进入选择界面");
|
|
Debug.Log("进入选择界面");
|
|
|
|
+ scrollbar.gameObject.SetActive(false);
|
|
histroy.RemoveAt(histroy.Count - 1);
|
|
histroy.RemoveAt(histroy.Count - 1);
|
|
Back_TwoFun(true);
|
|
Back_TwoFun(true);
|
|
break;
|
|
break;
|
|
@@ -400,8 +406,10 @@ namespace MetaClient
|
|
}
|
|
}
|
|
else if (_strArrary[0] == "ziDingyi")
|
|
else if (_strArrary[0] == "ziDingyi")
|
|
{
|
|
{
|
|
- int _chooseId = int.Parse(_strArrary[1]);
|
|
|
|
- ClickBtnFun(eCustomStyple, _chooseId, false,hasColorChoose);
|
|
|
|
|
|
+ scrollbar.gameObject.SetActive(false);
|
|
|
|
+ int _chooseId = int.Parse(_strArrary[2]);
|
|
|
|
+ hasColorChoose = int.Parse(_strArrary[1]) == 1 ? true : false;
|
|
|
|
+ ClickBtnFun(eCustomStyple, _chooseId, true,hasColorChoose);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -592,8 +600,8 @@ namespace MetaClient
|
|
GameObject _objPar = nieLianView.transform.GetChild(2).GetChild(0).gameObject;
|
|
GameObject _objPar = nieLianView.transform.GetChild(2).GetChild(0).gameObject;
|
|
RemoveAllChildren(_objPar);
|
|
RemoveAllChildren(_objPar);
|
|
//等有捏脸表时改为捏脸
|
|
//等有捏脸表时改为捏脸
|
|
- IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
|
|
- _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
|
|
|
|
|
|
+ IDataTable<DRCustomFace> _data = GameEntry.DataTable.GetDataTable<DRCustomFace>();
|
|
|
|
+ _facedata = GameEntry.DataTable.GetDataTable<DRCustomFace>();
|
|
int cengji = ziDingYi ? 0 : 1;
|
|
int cengji = ziDingYi ? 0 : 1;
|
|
if (ziDingYi)
|
|
if (ziDingYi)
|
|
{
|
|
{
|
|
@@ -614,13 +622,13 @@ namespace MetaClient
|
|
{
|
|
{
|
|
CreateColFun(parentid, _objPar,colItem);
|
|
CreateColFun(parentid, _objPar,colItem);
|
|
}
|
|
}
|
|
- DRCustomBody[] dRCustomBodies = _bodydata.GetAllDataRows();
|
|
|
|
|
|
+ DRCustomFace[] dRCustomBodies = _facedata.GetAllDataRows();
|
|
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&&dRCustomBodies[i].Cengji==cengji)
|
|
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, dRCustomBodies[i].IsActive);
|
|
|
|
|
|
+ CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body, dRCustomBodies[i].IsActive);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -662,7 +670,7 @@ namespace MetaClient
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
|
|
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, dRCustomBodies[i].IsActive);
|
|
|
|
|
|
+ CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body, dRCustomBodies[i].IsActive);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ChangeListBotton(_objPar);
|
|
ChangeListBotton(_objPar);
|
|
@@ -737,7 +745,7 @@ namespace MetaClient
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
Debug.Log(dRCustomBodies[i].Id);
|
|
if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
|
|
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, dRCustomBodies[i].IsActive);
|
|
|
|
|
|
+ CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body, dRCustomBodies[i].IsActive);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ChangeListBotton(_objPar);
|
|
ChangeListBotton(_objPar);
|
|
@@ -823,10 +831,11 @@ namespace MetaClient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- private void CreateButtonFun(string path,int _part,string _name, GameObject _parent,int _id,int buttonstyple,ECustomStyple eCustomStyple,int _isactive) {
|
|
|
|
|
|
+ private void CreateButtonFun(string path,string _name, GameObject _parent,int _id,int buttonstyple,ECustomStyple eCustomStyple,int _isactive) {
|
|
//Debug.Log(path);
|
|
//Debug.Log(path);
|
|
// Debug.Log(_parent);
|
|
// Debug.Log(_parent);
|
|
path = "CustomRole/" + path;
|
|
path = "CustomRole/" + path;
|
|
|
|
+ Debug.Log("图片名称" + _name);
|
|
GameEntry.Resource.LoadAsset(AssetUtility.GetUISpriteAsset(path), new LoadAssetCallbacks(
|
|
GameEntry.Resource.LoadAsset(AssetUtility.GetUISpriteAsset(path), new LoadAssetCallbacks(
|
|
(assetName, asset, duration, userData) =>
|
|
(assetName, asset, duration, userData) =>
|
|
{
|
|
{
|
|
@@ -839,7 +848,7 @@ namespace MetaClient
|
|
Image _objImg = _obj.transform.GetComponent<Image>();
|
|
Image _objImg = _obj.transform.GetComponent<Image>();
|
|
_obj.SetActive(true);
|
|
_obj.SetActive(true);
|
|
_objImg.sprite = sprite;
|
|
_objImg.sprite = sprite;
|
|
- _obj.name = part+"";
|
|
|
|
|
|
+ _obj.name = _name+"";
|
|
_obj.transform.SetParent(_parent.transform);
|
|
_obj.transform.SetParent(_parent.transform);
|
|
if (_isactive != 1)
|
|
if (_isactive != 1)
|
|
{
|
|
{
|
|
@@ -851,7 +860,7 @@ namespace MetaClient
|
|
uICustomBtn.eButtonStyple = (EButtonStyple)buttonstyple;
|
|
uICustomBtn.eButtonStyple = (EButtonStyple)buttonstyple;
|
|
uICustomBtn.eCustomStyple = eCustomStyple;
|
|
uICustomBtn.eCustomStyple = eCustomStyple;
|
|
uICustomBtn.isCreate = false;
|
|
uICustomBtn.isCreate = false;
|
|
- uICustomBtn.part = _part;
|
|
|
|
|
|
+ //uICustomBtn.part = _part;
|
|
|
|
|
|
//GameObject
|
|
//GameObject
|
|
//img.sprite = sprite;
|
|
//img.sprite = sprite;
|