|  | @@ -19,7 +19,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          //人物位置信息
 | 
	
		
			
				|  |  |          public TransformData roleTransFormData = new TransformData();
 | 
	
		
			
				|  |  |          public GameObject roleGameobj;
 | 
	
		
			
				|  |  | -        public int roleID = -1;
 | 
	
		
			
				|  |  | +        public string roleID = "Role";
 | 
	
		
			
				|  |  |          //*********************搭配数据*********************************
 | 
	
		
			
				|  |  |          //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList,
 | 
	
		
			
				|  |  |          public DressUpData MathingDressDate = DressUpData.CreateDefault();
 | 
	
	
		
			
				|  | @@ -34,7 +34,11 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          //场景名字,自己搭配的数据
 | 
	
		
			
				|  |  |          public List<string> DressPropNameList = new List<string>();
 | 
	
		
			
				|  |  |          //道具id
 | 
	
		
			
				|  |  | -        public List<int> DressPropIdList = new List<int>();
 | 
	
		
			
				|  |  | +        //public List<int> DressPropIdList = new List<int>();
 | 
	
		
			
				|  |  | +        //道具索引
 | 
	
		
			
				|  |  | +        public int DressPropIndex = 0;
 | 
	
		
			
				|  |  | +        //道具索引字典
 | 
	
		
			
				|  |  | +        public Dictionary<string, TransformData> DressPropTransInfoDic = new Dictionary<string, TransformData>();
 | 
	
		
			
				|  |  |          //道具位置信息
 | 
	
		
			
				|  |  |          public List<TransformData> TransformDataList = new List<TransformData>();
 | 
	
		
			
				|  |  |          public List<GameObject> itemGameObjs = new List<GameObject>();
 | 
	
	
		
			
				|  | @@ -116,28 +120,40 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              foreach(var item in MathingDressDate.itemList)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  CollocationInfo itemInfo = new CollocationInfo();
 | 
	
		
			
				|  |  | -                itemInfo.ItemId = item;
 | 
	
		
			
				|  |  | +                itemInfo.ItemId = item.ToString();
 | 
	
		
			
				|  |  |                  itemInfo.ClientPosition = "";
 | 
	
		
			
				|  |  |                  AllDressIDInfoList.Add(itemInfo);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            for(int i = 0;i< DressPropIdList.Count;i++)
 | 
	
		
			
				|  |  | +            foreach (var item in DressPropTransInfoDic)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  CollocationInfo itemInfo = new CollocationInfo();
 | 
	
		
			
				|  |  | -                itemInfo.ItemId = DressPropIdList[i];
 | 
	
		
			
				|  |  | -                string transStr = TransformDataList[i].position.x.ToString()+"_" + TransformDataList[i].position.y.ToString() + "_" 
 | 
	
		
			
				|  |  | -                    + TransformDataList[i].position.z.ToString()
 | 
	
		
			
				|  |  | -                   + "_" + TransformDataList[i].rotationZ.ToString()
 | 
	
		
			
				|  |  | -                   + "_" + TransformDataList[i].scale.x.ToString() + "_" + 
 | 
	
		
			
				|  |  | -                   TransformDataList[i].scale.y.ToString() + "_" + TransformDataList[i].scale.z.ToString();
 | 
	
		
			
				|  |  | +                itemInfo.ItemId = item.Key;
 | 
	
		
			
				|  |  | +                string transStr = item.Value.position.x.ToString() + "_" + item.Value.position.y.ToString() + "_"
 | 
	
		
			
				|  |  | +                    + item.Value.position.z.ToString()
 | 
	
		
			
				|  |  | +                   + "_" + item.Value.rotationZ.ToString()
 | 
	
		
			
				|  |  | +                   + "_" + item.Value.scale.x.ToString() + "_" +
 | 
	
		
			
				|  |  | +                   item.Value.scale.y.ToString() + "_" + item.Value.scale.z.ToString();
 | 
	
		
			
				|  |  |                  itemInfo.ClientPosition = transStr;
 | 
	
		
			
				|  |  |                  AllDressIDInfoList.Add(itemInfo);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            //for(int i = 0;i< DressPropIdList.Count;i++)
 | 
	
		
			
				|  |  | +            //{
 | 
	
		
			
				|  |  | +            //    CollocationInfo itemInfo = new CollocationInfo();
 | 
	
		
			
				|  |  | +            //    itemInfo.ItemId = DressPropIdList[i];
 | 
	
		
			
				|  |  | +            //    string transStr = TransformDataList[i].position.x.ToString()+"_" + TransformDataList[i].position.y.ToString() + "_" 
 | 
	
		
			
				|  |  | +            //        + TransformDataList[i].position.z.ToString()
 | 
	
		
			
				|  |  | +            //       + "_" + TransformDataList[i].rotationZ.ToString()
 | 
	
		
			
				|  |  | +            //       + "_" + TransformDataList[i].scale.x.ToString() + "_" + 
 | 
	
		
			
				|  |  | +            //       TransformDataList[i].scale.y.ToString() + "_" + TransformDataList[i].scale.z.ToString();
 | 
	
		
			
				|  |  | +            //    itemInfo.ClientPosition = transStr;
 | 
	
		
			
				|  |  | +            //    AllDressIDInfoList.Add(itemInfo);
 | 
	
		
			
				|  |  | +            //}
 | 
	
		
			
				|  |  |              CollocationInfo itemBgInfo = new CollocationInfo();
 | 
	
		
			
				|  |  | -            itemBgInfo.ItemId = MatchingCompetitionDataManager.Instance.DressUpBgID;
 | 
	
		
			
				|  |  | +            itemBgInfo.ItemId = MatchingCompetitionDataManager.Instance.DressUpBgID.ToString();
 | 
	
		
			
				|  |  |              itemBgInfo.ClientPosition = "";
 | 
	
		
			
				|  |  |              AllDressIDInfoList.Add(itemBgInfo);
 | 
	
		
			
				|  |  |              CollocationInfo itemActionInfo = new CollocationInfo();
 | 
	
		
			
				|  |  | -            itemActionInfo.ItemId = MatchingCompetitionDataManager.Instance.MathingDressDate.actionId;
 | 
	
		
			
				|  |  | +            itemActionInfo.ItemId = MatchingCompetitionDataManager.Instance.MathingDressDate.actionId.ToString();
 | 
	
		
			
				|  |  |              itemActionInfo.ClientPosition = "";
 | 
	
		
			
				|  |  |              AllDressIDInfoList.Add(itemActionInfo);
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -149,57 +165,57 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              List<TransformData> transDataList = new List<TransformData>();
 | 
	
		
			
				|  |  |              DressUpBgID = 0;
 | 
	
		
			
				|  |  |              MathingDressDate.actionId = 0;
 | 
	
		
			
				|  |  | +            DressPropTransInfoDic.Clear();
 | 
	
		
			
				|  |  |              for (int i = 0; i < AllDressIDInfoList.Count; i++)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  if(AllDressIDInfoList[i].ItemId == roleID)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    propIDList.Add(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                    transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                    //propIDList.Add(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                    //transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                    DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(GetIDByString(AllDressIDInfoList[i].ItemId));
 | 
	
		
			
				|  |  |                      if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  |                          if(itemCfg.subType == 19 || itemCfg.subType == 17 || itemCfg.subType == 21|| itemCfg.subType == 22)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  |                              //记录道具和位置信息
 | 
	
		
			
				|  |  | -                            propIDList.Add(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                            transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | -                            if (itemCfg.resLayer2 == "t" || itemCfg.resLayer3 == "t")
 | 
	
		
			
				|  |  | -                            {
 | 
	
		
			
				|  |  | -                                propIDList.Add(-3);
 | 
	
		
			
				|  |  | -                                transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | +                            //propIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
 | 
	
		
			
				|  |  | +                            //transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                            DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else if (itemCfg != null && itemCfg.subType == ConstDressUpItemType.BEI_JING)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  |                              DressUpBgID = itemCfg.id;
 | 
	
		
			
				|  |  | +                            MathingDressDate.bgId = itemCfg.id;
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  | -                            dressitemIDList.Add(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                            dressitemIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
 | 
	
		
			
				|  |  |                          }    
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  |                          //记录道具和位置信息
 | 
	
		
			
				|  |  | -                        propIDList.Add(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                        transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                        //propIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
 | 
	
		
			
				|  |  | +                        //transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                        DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      else if(itemCfg == null)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  | -                        SuitCfg actionId = SuitCfgArray.Instance.GetCfg(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                        SuitCfg actionId = SuitCfgArray.Instance.GetCfg(GetIDByString(AllDressIDInfoList[i].ItemId));
 | 
	
		
			
				|  |  |                          if(actionId !=null)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  | -                            MathingDressDate.actionId = AllDressIDInfoList[i].ItemId;
 | 
	
		
			
				|  |  | +                            MathingDressDate.actionId = GetIDByString(AllDressIDInfoList[i].ItemId);
 | 
	
		
			
				|  |  |                          }   
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              MathingDressDate.itemList = dressitemIDList;
 | 
	
		
			
				|  |  | -            DressPropIdList = propIDList;
 | 
	
		
			
				|  |  | -            TransformDataList = transDataList;
 | 
	
		
			
				|  |  | +            //DressPropIdList = propIDList;
 | 
	
		
			
				|  |  | +            //TransformDataList = transDataList;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public TransformData AnalysisStringToTransform(string strTrans)
 | 
	
		
			
				|  |  |          {
 | 
	
	
		
			
				|  | @@ -222,11 +238,12 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              DressPropNameList.Clear();
 | 
	
		
			
				|  |  |              TransformDataList.Clear();
 | 
	
		
			
				|  |  | +            DressPropTransInfoDic.Clear();
 | 
	
		
			
				|  |  |              for (int i =0;i<itemGameObjs.Count;i++)
 | 
	
		
			
				|  |  | -            { 
 | 
	
		
			
				|  |  | -                if(itemGameObjs[i].name == "Role")
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                TransformData itemData = new TransformData();
 | 
	
		
			
				|  |  | +                if (itemGameObjs[i].name == "Role")
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    TransformData itemData = new TransformData();
 | 
	
		
			
				|  |  |                      roleTransFormData.position = itemGameObjs[i].transform.position;
 | 
	
		
			
				|  |  |                      roleTransFormData.rotationZ = itemGameObjs[i].transform.eulerAngles.z;
 | 
	
		
			
				|  |  |                      roleTransFormData.scale = itemGameObjs[i].transform.localScale;
 | 
	
	
		
			
				|  | @@ -235,67 +252,97 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    TransformData itemData = new TransformData();
 | 
	
		
			
				|  |  |                      itemData.position = itemGameObjs[i].transform.position;
 | 
	
		
			
				|  |  |                      itemData.rotationZ = itemGameObjs[i].transform.eulerAngles.z;
 | 
	
		
			
				|  |  |                      itemData.scale = itemGameObjs[i].transform.localScale;
 | 
	
		
			
				|  |  |                      TransformDataList.Add(itemData);
 | 
	
		
			
				|  |  |                      DressPropNameList.Add(itemGameObjs[i].name);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +                DressPropTransInfoDic.Add(itemGameObjs[i].name, itemData);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            SetNameToIdList();
 | 
	
		
			
				|  |  | +            //SetNameToIdList();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        //将名字转换成道具id
 | 
	
		
			
				|  |  | -        public void SetNameToIdList()
 | 
	
		
			
				|  |  | +        public int GetIDByString(string name)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            DressPropIdList.Clear();
 | 
	
		
			
				|  |  | -            int flog_prefix = 0;
 | 
	
		
			
				|  |  | -            int flog_suffix = 0;
 | 
	
		
			
				|  |  | -            for (int i = 0; i < DressPropNameList.Count; i++)
 | 
	
		
			
				|  |  | +            int id = 0;
 | 
	
		
			
				|  |  | +            //使用正则表达式分割字符串
 | 
	
		
			
				|  |  | +            string[] parts = Regex.Split(name, "_");
 | 
	
		
			
				|  |  | +            if(parts.Length > 0)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                bool containsUnderscore = Regex.IsMatch(DressPropNameList[i], "_");
 | 
	
		
			
				|  |  | -                if(!containsUnderscore)
 | 
	
		
			
				|  |  | +                if(parts[0] == "Role")
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    if (DressPropNameList[i] == "Role")
 | 
	
		
			
				|  |  | -                    {
 | 
	
		
			
				|  |  | -                        DressPropIdList.Add(roleID);
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    else if (DressPropNameList[i] == "Border")
 | 
	
		
			
				|  |  | -                    {
 | 
	
		
			
				|  |  | -                        if (BorderID != 0)
 | 
	
		
			
				|  |  | -                        {
 | 
	
		
			
				|  |  | -                            DressPropIdList.Add(BorderID);
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    else if (DressPropNameList[i] == "Npc")
 | 
	
		
			
				|  |  | -                    {
 | 
	
		
			
				|  |  | -                        if (NpcID != 0)
 | 
	
		
			
				|  |  | -                        {
 | 
	
		
			
				|  |  | -                            DressPropIdList.Add(NpcID);
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -                else
 | 
	
		
			
				|  |  | -                {
 | 
	
		
			
				|  |  | -                    // 使用正则表达式分割字符串
 | 
	
		
			
				|  |  | -                    string[] parts = Regex.Split(DressPropNameList[i], "_");
 | 
	
		
			
				|  |  | -                    int partID = int.Parse(parts[0]);
 | 
	
		
			
				|  |  | -                    if(flog_prefix == int.Parse(parts[0]))
 | 
	
		
			
				|  |  | -                    {
 | 
	
		
			
				|  |  | -                        if((flog_suffix == 3 && int.Parse(parts[1]) == 1)|| (flog_suffix == 1 && int.Parse(parts[1]) == 3))
 | 
	
		
			
				|  |  | -                        {
 | 
	
		
			
				|  |  | -                            flog_prefix = 0;
 | 
	
		
			
				|  |  | -                            flog_suffix = 0;
 | 
	
		
			
				|  |  | -                            continue;
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    flog_prefix = int.Parse(parts[0]);
 | 
	
		
			
				|  |  | -                    flog_suffix = int.Parse(parts[1]);   
 | 
	
		
			
				|  |  | -                    DressPropIdList.Add(partID);
 | 
	
		
			
				|  |  | +                    return -1;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +                id = int.Parse(parts[0]);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            return id;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        public List<int> GetIDListByString(string name)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            List<int> idList = new List<int>();
 | 
	
		
			
				|  |  | +            string[] parts = Regex.Split(name, "_");
 | 
	
		
			
				|  |  | +            foreach(string id in parts)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                idList.Add(int.Parse(id));
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            return idList;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        //将名字转换成道具id
 | 
	
		
			
				|  |  | +        //public void SetNameToIdList()
 | 
	
		
			
				|  |  | +        //{
 | 
	
		
			
				|  |  | +        //    //DressPropIdList.Clear();
 | 
	
		
			
				|  |  | +        //    int flog_prefix = 0;
 | 
	
		
			
				|  |  | +        //    int flog_suffix = 0;
 | 
	
		
			
				|  |  | +        //    for (int i = 0; i < DressPropNameList.Count; i++)
 | 
	
		
			
				|  |  | +        //    {
 | 
	
		
			
				|  |  | +        //        bool containsUnderscore = Regex.IsMatch(DressPropNameList[i], "_");
 | 
	
		
			
				|  |  | +        //        if(!containsUnderscore)
 | 
	
		
			
				|  |  | +        //        {
 | 
	
		
			
				|  |  | +        //            if (DressPropNameList[i] == "Role")
 | 
	
		
			
				|  |  | +        //            {
 | 
	
		
			
				|  |  | +        //                DressPropIdList.Add(roleID);
 | 
	
		
			
				|  |  | +        //            }
 | 
	
		
			
				|  |  | +        //            else if (DressPropNameList[i] == "Border")
 | 
	
		
			
				|  |  | +        //            {
 | 
	
		
			
				|  |  | +        //                if (BorderID != 0)
 | 
	
		
			
				|  |  | +        //                {
 | 
	
		
			
				|  |  | +        //                    DressPropIdList.Add(BorderID);
 | 
	
		
			
				|  |  | +        //                }
 | 
	
		
			
				|  |  | +        //            }
 | 
	
		
			
				|  |  | +        //            else if (DressPropNameList[i] == "Npc")
 | 
	
		
			
				|  |  | +        //            {
 | 
	
		
			
				|  |  | +        //                if (NpcID != 0)
 | 
	
		
			
				|  |  | +        //                {
 | 
	
		
			
				|  |  | +        //                    DressPropIdList.Add(NpcID);
 | 
	
		
			
				|  |  | +        //                }
 | 
	
		
			
				|  |  | +        //            }
 | 
	
		
			
				|  |  | +        //        }
 | 
	
		
			
				|  |  | +        //        else
 | 
	
		
			
				|  |  | +        //        {
 | 
	
		
			
				|  |  | +        //            // 使用正则表达式分割字符串
 | 
	
		
			
				|  |  | +        //            string[] parts = Regex.Split(DressPropNameList[i], "_");
 | 
	
		
			
				|  |  | +        //            int partID = int.Parse(parts[0]);
 | 
	
		
			
				|  |  | +        //            if(flog_prefix == int.Parse(parts[0]))
 | 
	
		
			
				|  |  | +        //            {
 | 
	
		
			
				|  |  | +        //                if((flog_suffix == 3 && int.Parse(parts[1]) == 1)|| (flog_suffix == 1 && int.Parse(parts[1]) == 3))
 | 
	
		
			
				|  |  | +        //                {
 | 
	
		
			
				|  |  | +        //                    flog_prefix = 0;
 | 
	
		
			
				|  |  | +        //                    flog_suffix = 0;
 | 
	
		
			
				|  |  | +        //                    continue;
 | 
	
		
			
				|  |  | +        //                }
 | 
	
		
			
				|  |  | +        //                if ((flog_suffix == 2 && int.Parse(parts[1]) == 1) || (flog_suffix == 1 && int.Parse(parts[1]) == 2))
 | 
	
		
			
				|  |  | +        //                {
 | 
	
		
			
				|  |  | +        //                    flog_prefix = 0;
 | 
	
		
			
				|  |  | +        //                    flog_suffix = 0;
 | 
	
		
			
				|  |  | +        //                    continue;
 | 
	
		
			
				|  |  | +        //                }
 | 
	
		
			
				|  |  | +        //            }
 | 
	
		
			
				|  |  | +        //            flog_prefix = int.Parse(parts[0]);
 | 
	
		
			
				|  |  | +        //            flog_suffix = int.Parse(parts[1]);   
 | 
	
		
			
				|  |  | +        //            DressPropIdList.Add(partID);
 | 
	
		
			
				|  |  | +        //        }
 | 
	
		
			
				|  |  | +        //    }
 | 
	
		
			
				|  |  | +        //}
 | 
	
		
			
				|  |  |          //将穿戴数据分类
 | 
	
		
			
				|  |  |          //public void ClassifyEquipData()
 | 
	
		
			
				|  |  |          //{
 | 
	
	
		
			
				|  | @@ -324,9 +371,11 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          //}
 | 
	
		
			
				|  |  |          public void InsertGameObjectList()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            for(int i=0;i< DressPropIdList.Count;i++)
 | 
	
		
			
				|  |  | +            int i = 0;
 | 
	
		
			
				|  |  | +            foreach(var item in DressPropTransInfoDic)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                if (DressPropIdList[i] == roleID)
 | 
	
		
			
				|  |  | +                i++;
 | 
	
		
			
				|  |  | +                if (item.Key == roleID)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      indexRoleData = i;
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -411,7 +460,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              Vector3 pos = Vector3.zero;
 | 
	
		
			
				|  |  |              if (!string.IsNullOrEmpty(itemCfg.resLayer3))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 3));
 | 
	
		
			
				|  |  | +                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)
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -424,7 +473,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              if (!string.IsNullOrEmpty(itemCfg.resLayer2))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 2));
 | 
	
		
			
				|  |  | +                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)
 | 
	
		
			
				|  |  |                  {
 | 
	
	
		
			
				|  | @@ -439,7 +488,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              if (!string.IsNullOrEmpty(itemCfg.resLayer1))
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}", itemCfg.id, 1));
 | 
	
		
			
				|  |  | +                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)
 | 
	
	
		
			
				|  | @@ -453,6 +502,22 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        public async void AddSceneItemOne(ItemCfg itemCfg, int layer,int index, int isLeft = 0, bool setLayer = true)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            Vector3 pos = Vector3.zero;
 | 
	
		
			
				|  |  | +            DressPropIndex++;
 | 
	
		
			
				|  |  | +            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)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                if (parentGameObj3.transform.childCount > 0)
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                    parentGameObj3.transform.localPosition = -parentGameObj3.transform.GetChild(0).localPosition;
 | 
	
		
			
				|  |  | +                    pos = parentGameObj3.transform.localPosition;
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          public void OnClickBtnRule()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              ViewManager.Show<MatchingCompetitionRuleTipsView>();
 | 
	
	
		
			
				|  | @@ -466,7 +531,7 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          //人物位置信息
 | 
	
		
			
				|  |  |          public TransformData roleTransFormData = new TransformData();
 | 
	
		
			
				|  |  |          public GameObject roleGameobj;
 | 
	
		
			
				|  |  | -        public int roleID = -1;
 | 
	
		
			
				|  |  | +        public string roleID = "Role";
 | 
	
		
			
				|  |  |          //*********************搭配数据*********************************
 | 
	
		
			
				|  |  |          //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList,
 | 
	
		
			
				|  |  |          public DressUpData MathingDressDate = DressUpData.CreateDefault();
 | 
	
	
		
			
				|  | @@ -478,9 +543,13 @@ namespace GFGGame
 | 
	
		
			
				|  |  |          public int NpcID = 0;
 | 
	
		
			
				|  |  |          //道具数据,一一对应
 | 
	
		
			
				|  |  |          //道具id
 | 
	
		
			
				|  |  | -        public List<int> DressPropIdList = new List<int>();
 | 
	
		
			
				|  |  | +        //public List<int> DressPropIdList = new List<int>();
 | 
	
		
			
				|  |  |          //道具位置信息
 | 
	
		
			
				|  |  |          public List<TransformData> TransformDataList = new List<TransformData>();
 | 
	
		
			
				|  |  | +        //道具索引
 | 
	
		
			
				|  |  | +        public int DressPropIndex = 0;
 | 
	
		
			
				|  |  | +        //道具索引字典
 | 
	
		
			
				|  |  | +        public Dictionary<string, TransformData> DressPropTransInfoDic = new Dictionary<string, TransformData>();
 | 
	
		
			
				|  |  |          public List<GameObject> itemGameObjs = new List<GameObject>();
 | 
	
		
			
				|  |  |          //***************************************************************
 | 
	
		
			
				|  |  |          //解析后台获取的信息
 | 
	
	
		
			
				|  | @@ -491,26 +560,24 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              List<TransformData> transDataList = new List<TransformData>();
 | 
	
		
			
				|  |  |              for (int i = 0; i < OneRoleInfo.JudgingInfo.CollocationInfoList.Count; i++)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                if (OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId == roleID)
 | 
	
		
			
				|  |  | +                CollocationInfo colloctItemInfo = OneRoleInfo.JudgingInfo.CollocationInfoList[i];
 | 
	
		
			
				|  |  | +                if (colloctItemInfo.ItemId == roleID)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                    transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                    //propIDList.Add(colloctItemInfo.ItemId);
 | 
	
		
			
				|  |  | +                    //transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  | +                    DressPropTransInfoDic.Add(colloctItemInfo.ItemId, MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  else
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  | -                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(MatchingCompetitionDataManager.Instance.GetIDByString( colloctItemInfo.ItemId));
 | 
	
		
			
				|  |  |                      if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  |                          if (itemCfg.subType == 19 || itemCfg.subType == 17 || itemCfg.subType == 21 || itemCfg.subType == 22)
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  |                              //记录道具和位置信息
 | 
	
		
			
				|  |  | -                            propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                            transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | -                            if(itemCfg.resLayer2 == "t" || itemCfg.resLayer3 == "t")
 | 
	
		
			
				|  |  | -                            {
 | 
	
		
			
				|  |  | -                                propIDList.Add(-3);
 | 
	
		
			
				|  |  | -                                transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | -                            }
 | 
	
		
			
				|  |  | +                            //propIDList.Add(colloctItemInfo.ItemId);
 | 
	
		
			
				|  |  | +                            //transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  | +                            DressPropTransInfoDic.Add(colloctItemInfo.ItemId, MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else if (itemCfg != null && itemCfg.subType == ConstDressUpItemType.BEI_JING)
 | 
	
		
			
				|  |  |                          {
 | 
	
	
		
			
				|  | @@ -518,29 +585,32 @@ namespace GFGGame
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                          else
 | 
	
		
			
				|  |  |                          {
 | 
	
		
			
				|  |  | -                            dressitemIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
 | 
	
		
			
				|  |  | +                            dressitemIDList.Add(MatchingCompetitionDataManager.Instance.GetIDByString(colloctItemInfo.ItemId));
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                      else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH)
 | 
	
		
			
				|  |  |                      {
 | 
	
		
			
				|  |  |                          //记录道具和位置信息
 | 
	
		
			
				|  |  | -                        propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
 | 
	
		
			
				|  |  | -                        transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
 | 
	
		
			
				|  |  | +                        //propIDList.Add(colloctItemInfo.ItemId);
 | 
	
		
			
				|  |  | +                        //transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  | +                        DressPropTransInfoDic.Add(colloctItemInfo.ItemId, MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              MathingDressDate.itemList = dressitemIDList;
 | 
	
		
			
				|  |  |              MathingDressDate.actionId = OneRoleInfo.JudgingInfo.ActionId;
 | 
	
		
			
				|  |  | -            DressPropIdList = propIDList;
 | 
	
		
			
				|  |  | -            TransformDataList = transDataList;
 | 
	
		
			
				|  |  | +            //DressPropIdList = propIDList;
 | 
	
		
			
				|  |  | +            //TransformDataList = transDataList;
 | 
	
		
			
				|  |  |              DressUpBgID = OneRoleInfo.JudgingInfo.BagId;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          public void InsertGameObjectList()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              int indexRoleData = 0;
 | 
	
		
			
				|  |  | -            for (int i = 0; i < DressPropIdList.Count; i++)
 | 
	
		
			
				|  |  | +            int i = 0;
 | 
	
		
			
				|  |  | +            foreach (var item in DressPropTransInfoDic)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -                if (DressPropIdList[i] == roleID)
 | 
	
		
			
				|  |  | +                i++;
 | 
	
		
			
				|  |  | +                if (item.Key == roleID)
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                      indexRoleData = i;
 | 
	
		
			
				|  |  |                  }
 |