|
|
@@ -1,5 +1,4 @@
|
|
|
-
|
|
|
-using ET;
|
|
|
+using ET;
|
|
|
using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
@@ -9,6 +8,7 @@ using Live2D.Cubism.Rendering;
|
|
|
using FairyGUI;
|
|
|
using UI.MatchingCompetition;
|
|
|
using System.IO;
|
|
|
+using cfg.GfgCfg;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
|
@@ -18,29 +18,39 @@ namespace GFGGame
|
|
|
//public int type = 2;
|
|
|
//位置信息数据索引
|
|
|
public int indexRoleData = 0;
|
|
|
+
|
|
|
//人物位置信息
|
|
|
public TransformData roleTransFormData = new TransformData();
|
|
|
public GameObject roleGameobj;
|
|
|
+
|
|
|
public string roleID = "Role";
|
|
|
+
|
|
|
//*********************搭配数据*********************************
|
|
|
//需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList,
|
|
|
public DressUpData MathingDressDate = DressUpData.CreateDefault();
|
|
|
+
|
|
|
public int DressUpBgID = 0;
|
|
|
+
|
|
|
//*****这两个id放列表的最后面
|
|
|
//边框id
|
|
|
public int BorderID = 0;
|
|
|
+
|
|
|
//NpcId
|
|
|
public int NpcID = 0;
|
|
|
+
|
|
|
//*************=**************
|
|
|
//道具数据,一一对应
|
|
|
//场景名字,自己搭配的数据
|
|
|
public List<string> DressPropNameList = new List<string>();
|
|
|
+
|
|
|
//道具id
|
|
|
//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>();
|
|
|
@@ -58,25 +68,34 @@ namespace GFGGame
|
|
|
public int MatchingRemainingTimes = 1;
|
|
|
public MyWorksIdInfo myWorks = new MyWorksIdInfo();
|
|
|
public List<ItemInfoProto> SpecialBonusList = new List<ItemInfoProto>();
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 搭配赛相册
|
|
|
/// </summary>
|
|
|
/// <typeparam name="PoemPhotoData"></typeparam>
|
|
|
/// <returns></returns>
|
|
|
public List<PoemPhotoData> MatchingPhotoInfos = new List<PoemPhotoData>();
|
|
|
+
|
|
|
//角色详情界面图片信息
|
|
|
public NTexture DetailNtexture;
|
|
|
+
|
|
|
//自己的搭配图片
|
|
|
public NTexture MyNtextture;
|
|
|
+
|
|
|
public byte[] MyBytes;
|
|
|
+
|
|
|
//本期排行榜数据
|
|
|
public List<CurRanMatchingPhotoWorksData> _currentRankList = new List<CurRanMatchingPhotoWorksData>();
|
|
|
+
|
|
|
//本期排行榜数据--协程锁变量
|
|
|
public bool IsWork = false;
|
|
|
+
|
|
|
//本期排行榜数据--协程消息队列
|
|
|
public Queue<int> _coroutineQueue = new Queue<int>();
|
|
|
+
|
|
|
//往期作品集
|
|
|
public List<MatchingWorksData> _BeforeWorksList = new List<MatchingWorksData>();
|
|
|
+
|
|
|
//往期排行榜数据
|
|
|
public List<MatchingPhotoWorksData> _BeforeRankList = new List<MatchingPhotoWorksData>();
|
|
|
|
|
|
@@ -123,25 +142,27 @@ namespace GFGGame
|
|
|
{
|
|
|
//将所有需要存储的信息转换成list
|
|
|
AllDressIDInfoList.Clear();
|
|
|
- foreach(var item in MathingDressDate.itemList)
|
|
|
+ foreach (var item in MathingDressDate.itemList)
|
|
|
{
|
|
|
CollocationInfo itemInfo = new CollocationInfo();
|
|
|
itemInfo.ItemId = item.ToString();
|
|
|
itemInfo.ClientPosition = "";
|
|
|
AllDressIDInfoList.Add(itemInfo);
|
|
|
}
|
|
|
+
|
|
|
foreach (var item in DressPropTransInfoDic)
|
|
|
{
|
|
|
CollocationInfo itemInfo = new CollocationInfo();
|
|
|
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();
|
|
|
+ + 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();
|
|
|
@@ -163,6 +184,7 @@ namespace GFGGame
|
|
|
itemActionInfo.ClientPosition = "";
|
|
|
AllDressIDInfoList.Add(itemActionInfo);
|
|
|
}
|
|
|
+
|
|
|
//解析后台获取的信息
|
|
|
public void AnalysisInfoToList()
|
|
|
{
|
|
|
@@ -175,72 +197,83 @@ namespace GFGGame
|
|
|
DressPropTransInfoDic.Clear();
|
|
|
for (int i = 0; i < AllDressIDInfoList.Count; i++)
|
|
|
{
|
|
|
- if(AllDressIDInfoList[i].ItemId == roleID)
|
|
|
+ if (AllDressIDInfoList[i].ItemId == roleID)
|
|
|
{
|
|
|
//propIDList.Add(AllDressIDInfoList[i].ItemId);
|
|
|
//transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
if (!DressPropTransInfoDic.ContainsKey(AllDressIDInfoList[i].ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
+ DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(),
|
|
|
+ AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
- if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
|
|
|
+ ItemCfg itemCfg =
|
|
|
+ CommonDataManager.Tables.TblItemCfg.GetOrDefault(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)
|
|
|
+ if (itemCfg.SubType == 19 || itemCfg.SubType == 17 || itemCfg.SubType == 21 ||
|
|
|
+ itemCfg.SubType == 22)
|
|
|
{
|
|
|
//记录道具和位置信息
|
|
|
//propIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
//transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
- if(GetIDListByString(AllDressIDInfoList[i].ItemId).Count > 1)
|
|
|
+ if (GetIDListByString(AllDressIDInfoList[i].ItemId).Count > 1)
|
|
|
{
|
|
|
if (!DressPropTransInfoDic.ContainsKey(AllDressIDInfoList[i].ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
+ DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(),
|
|
|
+ AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- else if (itemCfg != null && itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
+ else if (itemCfg != null && itemCfg.SubType == ConstDressUpItemType.BEI_JING)
|
|
|
{
|
|
|
- DressUpBgID = itemCfg.id;
|
|
|
- MathingDressDate.bgId = itemCfg.id;
|
|
|
+ DressUpBgID = itemCfg.Id;
|
|
|
+ MathingDressDate.bgId = itemCfg.Id;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
dressitemIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH)
|
|
|
+ else if (itemCfg != null && itemCfg.ItemType == ConstItemType.PHOTOGRAPH)
|
|
|
{
|
|
|
//记录道具和位置信息
|
|
|
//propIDList.Add(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
//transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
if (!DressPropTransInfoDic.ContainsKey(AllDressIDInfoList[i].ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(), AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
+ DressPropTransInfoDic.Add(AllDressIDInfoList[i].ItemId.ToString(),
|
|
|
+ AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
|
|
|
}
|
|
|
}
|
|
|
- else if(itemCfg == null)
|
|
|
+ else if (itemCfg == null)
|
|
|
{
|
|
|
- SuitCfg actionId = SuitCfgArray.Instance.GetCfg(GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
- if(actionId !=null)
|
|
|
+ SuitCfg actionId =
|
|
|
+ CommonDataManager.Tables.TblSuitCfg.GetOrDefault(
|
|
|
+ GetIDByString(AllDressIDInfoList[i].ItemId));
|
|
|
+
|
|
|
+ if (actionId != null)
|
|
|
{
|
|
|
MathingDressDate.actionId = GetIDByString(AllDressIDInfoList[i].ItemId);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MathingDressDate.itemList = dressitemIDList;
|
|
|
//DressPropIdList = propIDList;
|
|
|
//TransformDataList = transDataList;
|
|
|
}
|
|
|
+
|
|
|
public TransformData AnalysisStringToTransform(string strTrans)
|
|
|
{
|
|
|
TransformData transData = new TransformData();
|
|
|
string[] parts = Regex.Split(strTrans, "_");
|
|
|
- if(parts.Length > 6)
|
|
|
+ if (parts.Length > 6)
|
|
|
{
|
|
|
transData.position.x = float.Parse(parts[0]);
|
|
|
transData.position.y = float.Parse(parts[1]);
|
|
|
@@ -250,15 +283,17 @@ namespace GFGGame
|
|
|
transData.scale.y = float.Parse(parts[5]);
|
|
|
transData.scale.z = float.Parse(parts[6]);
|
|
|
}
|
|
|
+
|
|
|
return transData;
|
|
|
}
|
|
|
+
|
|
|
//存储道具信息
|
|
|
public void SetTransformData()
|
|
|
{
|
|
|
DressPropNameList.Clear();
|
|
|
TransformDataList.Clear();
|
|
|
DressPropTransInfoDic.Clear();
|
|
|
- for (int i =0;i<itemGameObjs.Count;i++)
|
|
|
+ for (int i = 0; i < itemGameObjs.Count; i++)
|
|
|
{
|
|
|
TransformData itemData = new TransformData();
|
|
|
if (itemGameObjs[i].name == "Role")
|
|
|
@@ -304,12 +339,11 @@ namespace GFGGame
|
|
|
itemData.scale = itemGameObjs[i].transform.localScale;
|
|
|
TransformDataList.Add(itemData);
|
|
|
DressPropNameList.Add(itemGameObjs[i].name);
|
|
|
- if(!DressPropTransInfoDic.ContainsKey(itemGameObjs[i].name))
|
|
|
+ if (!DressPropTransInfoDic.ContainsKey(itemGameObjs[i].name))
|
|
|
{
|
|
|
DressPropTransInfoDic.Add(itemGameObjs[i].name, itemData);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
//SetNameToIdList();
|
|
|
}
|
|
|
@@ -335,7 +369,7 @@ namespace GFGGame
|
|
|
{
|
|
|
return -3;
|
|
|
}
|
|
|
- else if(!isNumeric)
|
|
|
+ else if (!isNumeric)
|
|
|
{
|
|
|
return -4;
|
|
|
}
|
|
|
@@ -345,16 +379,19 @@ namespace GFGGame
|
|
|
|
|
|
return id;
|
|
|
}
|
|
|
+
|
|
|
public List<int> GetIDListByString(string name)
|
|
|
{
|
|
|
List<int> idList = new List<int>();
|
|
|
string[] parts = Regex.Split(name, "_");
|
|
|
- foreach(string id in parts)
|
|
|
+ foreach (string id in parts)
|
|
|
{
|
|
|
idList.Add(int.Parse(id));
|
|
|
}
|
|
|
+
|
|
|
return idList;
|
|
|
}
|
|
|
+
|
|
|
//将名字转换成道具id
|
|
|
//public void SetNameToIdList()
|
|
|
//{
|
|
|
@@ -440,7 +477,7 @@ namespace GFGGame
|
|
|
public void InsertGameObjectList()
|
|
|
{
|
|
|
int i = 0;
|
|
|
- foreach(var item in DressPropTransInfoDic)
|
|
|
+ foreach (var item in DressPropTransInfoDic)
|
|
|
{
|
|
|
i++;
|
|
|
if (item.Key == roleID)
|
|
|
@@ -448,9 +485,11 @@ namespace GFGGame
|
|
|
indexRoleData = i;
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
indexRoleData = i;
|
|
|
}
|
|
|
- if(itemGameObjs.Count ==0)
|
|
|
+
|
|
|
+ if (itemGameObjs.Count == 0)
|
|
|
{
|
|
|
itemGameObjs.Add(roleGameobj);
|
|
|
}
|
|
|
@@ -464,21 +503,23 @@ namespace GFGGame
|
|
|
{
|
|
|
itemGameObjs.Insert(indexRoleData, roleGameobj);
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- public void SetNumToRank(int index,UI_Component4 rankCom)
|
|
|
+
|
|
|
+ public void SetNumToRank(int index, UI_Component4 rankCom)
|
|
|
{
|
|
|
int c1 = 0;
|
|
|
int c2 = 0;
|
|
|
- if(index<=3&& index >=1)
|
|
|
+ if (index <= 3 && index >= 1)
|
|
|
{
|
|
|
c2 = index;
|
|
|
}
|
|
|
+
|
|
|
if (index > 3 && index <= 9)
|
|
|
{
|
|
|
c1 = 0;
|
|
|
}
|
|
|
- else if(index >9 && index <= 50)
|
|
|
+ else if (index > 9 && index <= 50)
|
|
|
{
|
|
|
c1 = 1;
|
|
|
}
|
|
|
@@ -486,13 +527,14 @@ namespace GFGGame
|
|
|
{
|
|
|
c1 = 2;
|
|
|
}
|
|
|
+
|
|
|
rankCom.m_c1.selectedIndex = c1;
|
|
|
rankCom.m_c2.selectedIndex = c2;
|
|
|
- if(c1 == 0)
|
|
|
+ if (c1 == 0)
|
|
|
{
|
|
|
- rankCom.m_num3.url = string.Format("ui://MatchingCompetition/{0}",index.ToString());
|
|
|
+ rankCom.m_num3.url = string.Format("ui://MatchingCompetition/{0}", index.ToString());
|
|
|
}
|
|
|
- else if(c1 == 1)
|
|
|
+ else if (c1 == 1)
|
|
|
{
|
|
|
int one = index / 10;
|
|
|
int two = index % 10;
|
|
|
@@ -507,13 +549,15 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for (int i = 11; i < JudgingRoundRewardCfgArray.Instance.dataArray.Length-1; i++)
|
|
|
+ for (int i = 11; i < CommonDataManager.Tables.TblJudgingRoundRewardCfg.DataList.Count - 1; i++)
|
|
|
{
|
|
|
- JudgingRoundRewardCfg judgingCfg = JudgingRoundRewardCfgArray.Instance.GetCfg(i);
|
|
|
- JudgingRoundRewardCfg judgingNextCfg = JudgingRoundRewardCfgArray.Instance.GetCfg(i+1);
|
|
|
- if (index >= judgingCfg.rank && index < judgingNextCfg.rank)
|
|
|
+ JudgingRoundRewardCfg judgingCfg =
|
|
|
+ CommonDataManager.Tables.TblJudgingRoundRewardCfg.GetOrDefault(i);
|
|
|
+ JudgingRoundRewardCfg judgingNextCfg =
|
|
|
+ CommonDataManager.Tables.TblJudgingRoundRewardCfg.GetOrDefault(i + 1);
|
|
|
+ if (index >= judgingCfg.Rank && index < judgingNextCfg.Rank)
|
|
|
{
|
|
|
- rankCom.m_RankText.text = judgingNextCfg.desc;
|
|
|
+ rankCom.m_RankText.text = judgingNextCfg.Desc;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -521,18 +565,17 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- public async void AddSceneItem(ItemCfg itemCfg, bool setLayer,int isLeft = 0)
|
|
|
+
|
|
|
+ public async void AddSceneItem(ItemCfg itemCfg, bool setLayer, int isLeft = 0)
|
|
|
{
|
|
|
Vector3 pos = Vector3.zero;
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer3))
|
|
|
+ if (!string.IsNullOrEmpty(itemCfg.ResLayer3))
|
|
|
{
|
|
|
DressPropIndex++;
|
|
|
- GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 3,DressPropIndex));
|
|
|
- await PhotographSceneManager.Instance.AddSceneItem(parentGameObj3, itemCfg, 3, setLayer,false,isLeft);
|
|
|
+ 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)
|
|
|
{
|
|
|
if (parentGameObj3.transform.childCount > 0)
|
|
|
@@ -542,46 +585,52 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer2))
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(itemCfg.ResLayer2))
|
|
|
{
|
|
|
DressPropIndex++;
|
|
|
- GameObject parentGameObj2 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 2,DressPropIndex));
|
|
|
- await PhotographSceneManager.Instance.AddSceneItem(parentGameObj2, itemCfg, 2, setLayer,false, isLeft);
|
|
|
+ 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)
|
|
|
{
|
|
|
if (parentGameObj2.transform.childCount > 0)
|
|
|
{
|
|
|
- parentGameObj2.transform.localPosition = pos == Vector3.zero ? -parentGameObj2.transform.GetChild(0).localPosition : pos;
|
|
|
+ parentGameObj2.transform.localPosition = pos == Vector3.zero
|
|
|
+ ? -parentGameObj2.transform.GetChild(0).localPosition
|
|
|
+ : pos;
|
|
|
pos = parentGameObj2.transform.localPosition;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
- if (!string.IsNullOrEmpty(itemCfg.resLayer1))
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(itemCfg.ResLayer1))
|
|
|
{
|
|
|
DressPropIndex++;
|
|
|
- GameObject parentGameObj1 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, 1, 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)
|
|
|
{
|
|
|
if (parentGameObj1.transform.childCount > 0)
|
|
|
{
|
|
|
- parentGameObj1.transform.localPosition = pos == Vector3.zero ? -parentGameObj1.transform.GetChild(0).localPosition : pos;
|
|
|
+ parentGameObj1.transform.localPosition = pos == Vector3.zero
|
|
|
+ ? -parentGameObj1.transform.GetChild(0).localPosition
|
|
|
+ : pos;
|
|
|
pos = parentGameObj1.transform.localPosition;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- public async void AddSceneItemOne(ItemCfg itemCfg, int layer,int index, int isLeft = 0, bool setLayer = true)
|
|
|
+
|
|
|
+ public async void AddSceneItemOne(ItemCfg itemCfg, int layer, int index, int isLeft = 0, bool setLayer = true)
|
|
|
{
|
|
|
Vector3 pos = Vector3.zero;
|
|
|
- if(DressPropIndex <= index)
|
|
|
+ if (DressPropIndex <= index)
|
|
|
{
|
|
|
DressPropIndex = index + 1;
|
|
|
}
|
|
|
- GameObject parentGameObj3 = new GameObject(string.Format("{0}_{1}_{2}", itemCfg.id, layer, index));
|
|
|
+
|
|
|
+ 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)
|
|
|
{
|
|
|
@@ -603,29 +652,40 @@ namespace GFGGame
|
|
|
{
|
|
|
//其他玩家信息用于展示
|
|
|
public MatchingPhotoWorksData OneRoleInfo = new MatchingPhotoWorksData();
|
|
|
+
|
|
|
//人物位置信息
|
|
|
public TransformData roleTransFormData = new TransformData();
|
|
|
public GameObject roleGameobj;
|
|
|
+
|
|
|
public string roleID = "Role";
|
|
|
+
|
|
|
//*********************搭配数据*********************************
|
|
|
//需要传输的数据: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<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>();
|
|
|
+
|
|
|
//***************************************************************
|
|
|
//解析后台获取的信息
|
|
|
public void AnalysisInfoToList()
|
|
|
@@ -641,53 +701,67 @@ namespace GFGGame
|
|
|
{
|
|
|
//propIDList.Add(colloctItemInfo.ItemId);
|
|
|
//transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
|
|
|
- if(!DressPropTransInfoDic.ContainsKey(colloctItemInfo.ItemId))
|
|
|
+ if (!DressPropTransInfoDic.ContainsKey(colloctItemInfo.ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(colloctItemInfo.ItemId, MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
|
|
|
- }
|
|
|
+ DressPropTransInfoDic.Add(colloctItemInfo.ItemId,
|
|
|
+ MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo
|
|
|
+ .ClientPosition));
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(MatchingCompetitionDataManager.Instance.GetIDByString( colloctItemInfo.ItemId));
|
|
|
- if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
|
|
|
+ ItemCfg itemCfg =
|
|
|
+ CommonDataManager.Tables.TblItemCfg.GetOrDefault(
|
|
|
+ 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)
|
|
|
+ if (itemCfg.SubType == 19 || itemCfg.SubType == 17 || itemCfg.SubType == 21 ||
|
|
|
+ itemCfg.SubType == 22)
|
|
|
{
|
|
|
//记录道具和位置信息
|
|
|
//propIDList.Add(colloctItemInfo.ItemId);
|
|
|
//transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
|
|
|
if (!DressPropTransInfoDic.ContainsKey(colloctItemInfo.ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(colloctItemInfo.ItemId, MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
|
|
|
+ DressPropTransInfoDic.Add(colloctItemInfo.ItemId,
|
|
|
+ MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo
|
|
|
+ .ClientPosition));
|
|
|
}
|
|
|
}
|
|
|
- else if (itemCfg != null && itemCfg.subType == ConstDressUpItemType.BEI_JING)
|
|
|
+ else if (itemCfg != null && itemCfg.SubType == ConstDressUpItemType.BEI_JING)
|
|
|
{
|
|
|
- DressUpBgID = itemCfg.id;
|
|
|
+ DressUpBgID = itemCfg.Id;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dressitemIDList.Add(MatchingCompetitionDataManager.Instance.GetIDByString(colloctItemInfo.ItemId));
|
|
|
+ dressitemIDList.Add(
|
|
|
+ MatchingCompetitionDataManager.Instance.GetIDByString(colloctItemInfo.ItemId));
|
|
|
}
|
|
|
}
|
|
|
- else if (itemCfg != null && itemCfg.itemType == ConstItemType.PHOTOGRAPH)
|
|
|
+ else if (itemCfg != null && itemCfg.ItemType == ConstItemType.PHOTOGRAPH)
|
|
|
{
|
|
|
//记录道具和位置信息
|
|
|
//propIDList.Add(colloctItemInfo.ItemId);
|
|
|
//transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(colloctItemInfo.ClientPosition));
|
|
|
if (!DressPropTransInfoDic.ContainsKey(colloctItemInfo.ItemId))
|
|
|
{
|
|
|
- DressPropTransInfoDic.Add(colloctItemInfo.ItemId, 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;
|
|
|
DressUpBgID = OneRoleInfo.JudgingInfo.BagId;
|
|
|
}
|
|
|
+
|
|
|
public void InsertGameObjectList()
|
|
|
{
|
|
|
int indexRoleData = 0;
|
|
|
@@ -700,6 +774,7 @@ namespace GFGGame
|
|
|
indexRoleData = i;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (itemGameObjs.Count == 0)
|
|
|
{
|
|
|
itemGameObjs.Add(roleGameobj);
|
|
|
@@ -717,4 +792,4 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|