using ET; using System; using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; using UnityEngine; using Live2D.Cubism.Rendering; using FairyGUI; using UI.MatchingCompetition; namespace GFGGame { class MatchingLeftDataManager : SingletonBase { //其他玩家信息用于展示 public MatchingPhotoWorksData LeftRoleInfo = new MatchingPhotoWorksData(); //人物位置信息 public TransformData roleTransFormData = new TransformData(); public GameObject roleGameobj; public int roleID = -1; //*********************搭配数据********************************* //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList, public DressUpData MathingDressDate = DressUpData.CreateDefault(); public int DressUpBgID = 0; //*****这两个id放列表的最后面 //边框id public int BorderID = 0; //NpcId public int NpcID = 0; //道具数据,一一对应 //道具id public List DressPropIdList = new List(); //道具位置信息 public List TransformDataList = new List(); public List itemGameObjs = new List(); //*************************************************************** //解析后台获取的信息 public void AnalysisInfoToList() { List dressitemIDList = new List(); List propIDList = new List(); List transDataList = new List(); for (int i = 0; i < LeftRoleInfo.JudgingInfo.CollocationInfoList.Count; i++) { if (LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId == roleID) { propIDList.Add(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); } else { ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP) { if (itemCfg.subType == 9 || itemCfg.subType == 10 || itemCfg.subType == 11 || itemCfg.subType == 12) { //记录道具和位置信息 propIDList.Add(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition)); } else { dressitemIDList.Add(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); } } else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH) { //记录道具和位置信息 propIDList.Add(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(LeftRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition)); } } } MathingDressDate.itemList = dressitemIDList; MathingDressDate.actionId = LeftRoleInfo.JudgingInfo.ActionId; DressPropIdList = propIDList; TransformDataList = transDataList; DressUpBgID = LeftRoleInfo.JudgingInfo.BagId; } public void InsertGameObjectList() { int indexRoleData = 0; for (int i = 0; i < DressPropIdList.Count; i++) { if (DressPropIdList[i] == roleID) { indexRoleData = i; } } if (itemGameObjs.Count == 0) { itemGameObjs.Add(roleGameobj); } else { itemGameObjs.Insert(indexRoleData, roleGameobj); } } } class MatchingRightDataManager : SingletonBase { //其他玩家信息用于展示 public MatchingPhotoWorksData RightRoleInfo = new MatchingPhotoWorksData(); //人物位置信息 public TransformData roleTransFormData = new TransformData(); public GameObject roleGameobj; public int roleID = -1; //*********************搭配数据********************************* //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList, public DressUpData MathingDressDate = DressUpData.CreateDefault(); public int DressUpBgID = 0; //*****这两个id放列表的最后面 //边框id public int BorderID = 0; //NpcId public int NpcID = 0; //道具数据,一一对应 //道具id public List DressPropIdList = new List(); //道具位置信息 public List TransformDataList = new List(); public List itemGameObjs = new List(); //*************************************************************** //解析后台获取的信息 public void AnalysisInfoToList() { List dressitemIDList = new List(); List propIDList = new List(); List transDataList = new List(); for (int i = 0; i < RightRoleInfo.JudgingInfo.CollocationInfoList.Count; i++) { if (RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId == roleID) { propIDList.Add(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); } else { ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP) { if (itemCfg.subType == 9 || itemCfg.subType == 10 || itemCfg.subType == 11 || itemCfg.subType == 12) { //记录道具和位置信息 propIDList.Add(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition)); } else { dressitemIDList.Add(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); } } else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH) { //记录道具和位置信息 propIDList.Add(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId); transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(RightRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition)); } } } MathingDressDate.itemList = dressitemIDList; MathingDressDate.actionId = RightRoleInfo.JudgingInfo.ActionId; DressPropIdList = propIDList; TransformDataList = transDataList; DressUpBgID = RightRoleInfo.JudgingInfo.BagId; } public void InsertGameObjectList() { int indexRoleData = 0; for (int i = 0; i < DressPropIdList.Count; i++) { if (DressPropIdList[i] == roleID) { indexRoleData = i; } } if (itemGameObjs.Count == 0) { itemGameObjs.Add(roleGameobj); } else { itemGameObjs.Insert(indexRoleData, roleGameobj); } } } }