|
@@ -185,7 +185,10 @@ namespace GFGGame
|
|
|
//记录道具和位置信息
|
|
|
//propIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
//transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
- DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
+ if(GetIDListByString(AllDressIDInfoList[i].ItemId).Count > 1)
|
|
|
+ {
|
|
|
+ DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
+ }
|
|
|
}
|
|
|
else if (itemCfg != null && itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
{
|
|
@@ -379,7 +382,9 @@ namespace GFGGame
|
|
|
if (item.Key == roleID)
|
|
|
{
|
|
|
indexRoleData = i;
|
|
|
+ break;
|
|
|
}
|
|
|
+ indexRoleData = i;
|
|
|
}
|
|
|
if(itemGameObjs.Count ==0)
|
|
|
{
|
|
@@ -459,10 +464,10 @@ namespace GFGGame
|
|
|
public async void AddSceneItem(ItemCfg itemCfg, bool setLayer,int isLeft = 0)
|
|
|
{
|
|
|
Vector3 pos = Vector3.zero;
|
|
|
- DressPropIndex++;
|
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
|
{
|
|
|
- GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 3,DressPropIndex++));
|
|
|
+ DressPropIndex++;
|
|
|
+ GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 3,DressPropIndex));
|
|
|
await PhotographSceneManager.Instance.AddSceneItem(parentGameObj3, itemCfg, 3, setLayer,false,isLeft);
|
|
|
if (setLayer)
|
|
|
{
|
|
@@ -475,7 +480,8 @@ namespace GFGGame
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
|
{
|
|
|
- GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 2,DressPropIndex++));
|
|
|
+ DressPropIndex++;
|
|
|
+ GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 2,DressPropIndex));
|
|
|
await PhotographSceneManager.Instance.AddSceneItem(parentGameObj2, itemCfg, 2, setLayer,false, isLeft);
|
|
|
if (setLayer)
|
|
|
{
|
|
@@ -489,8 +495,8 @@ namespace GFGGame
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
|
{
|
|
|
-
|
|
|
- GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 1, DressPropIndex++));
|
|
|
+ DressPropIndex++;
|
|
|
+ GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 1, DressPropIndex));
|
|
|
await PhotographSceneManager.Instance.AddSceneItem(parentGameObj1, itemCfg, 1, setLayer, false, isLeft);
|
|
|
|
|
|
if (setLayer)
|
|
@@ -507,7 +513,10 @@ namespace GFGGame
|
|
|
public async void AddSceneItemOne(ItemCfg itemCfg, int layer,int index, int isLeft = 0, bool setLayer = true)
|
|
|
{
|
|
|
Vector3 pos = Vector3.zero;
|
|
|
- DressPropIndex++;
|
|
|
+ if(DressPropIndex <= index)
|
|
|
+ {
|
|
|
+ DressPropIndex = index + 1;
|
|
|
+ }
|
|
|
GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, layer, index));
|
|
|
await PhotographSceneManager.Instance.AddSceneItem(parentGameObj3, itemCfg, layer, setLayer, false, isLeft);
|
|
|
if (setLayer)
|