Forráskód Böngészése

搭配赛本地缓存数据处理

zhangyuqian 11 hónapja
szülő
commit
a07d4a146e

+ 16 - 7
GameClient/Assets/Game/HotUpdate/Data/MatchingCompetitionDataManager.cs

@@ -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)

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MatchingCompetition/UI_MatchingCompetitionGatheringUI.cs

@@ -15,6 +15,7 @@ namespace UI.MatchingCompetition
         public GTextField m_titleText;
         public GTextField m_timeText;
         public GTextField m_suitName;
+        public GGroup m_desc;
         public GButton m_btnUploadWorks;
         public GButton m_btnShop;
         public GButton m_BtnBack;
@@ -73,6 +74,7 @@ namespace UI.MatchingCompetition
             m_titleText = (GTextField)comp.GetChild("titleText");
             m_timeText = (GTextField)comp.GetChild("timeText");
             m_suitName = (GTextField)comp.GetChild("suitName");
+            m_desc = (GGroup)comp.GetChild("desc");
             m_btnUploadWorks = (GButton)comp.GetChild("btnUploadWorks");
             m_btnShop = (GButton)comp.GetChild("btnShop");
             m_BtnBack = (GButton)comp.GetChild("BtnBack");
@@ -87,6 +89,7 @@ namespace UI.MatchingCompetition
             m_titleText = null;
             m_timeText = null;
             m_suitName = null;
+            m_desc = null;
             m_btnUploadWorks = null;
             m_btnShop = null;
             m_BtnBack = null;

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/MatchingCompetitionSproxy.cs

@@ -35,6 +35,7 @@ namespace GFGGame
             if(response.MyWorks != null)
             {
                 MatchingCompetitionDataManager.Instance.myWorks = response.MyWorks;
+                MatchingCompetitionDataManager.Instance.WorksID = response.MyWorks.WorksId;
                 MatchingCompetitionDataManager.Instance.AllDressIDInfoList = response.MyWorks.CollocationInfoList;
             }
             else

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -689,6 +689,7 @@ namespace GFGGame
             }
             else
             {
+                MatchingCompetitionDataManager.Instance.DressPropTransInfoDic.Remove(memoryHitGameObj.name);
                 GameObject.DestroyImmediate(memoryHitGameObj);
             }
             _itemGameObjs.Remove(memoryHitGameObj);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/InstanceZones/InstanceZonesView.cs

@@ -166,7 +166,7 @@ namespace GFGGame
             }
             else
             {
-                PromptController.Instance.ShowFloatTextPrompt("搭配赛未开启!");
+                PromptController.Instance.ShowFloatTextPrompt("美人图未开启!");
             }
         }
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionGatheringView.cs

@@ -94,7 +94,7 @@ namespace GFGGame
             if (MatchingCompetitionDataManager.Instance.MyNtextture == null)
             {
                 _ui.m_playerImage.texture = null;
-                _ui.m_suitName.visible = true;
+                _ui.m_desc.visible = true;
                 DressUpObjUI dressUpObjUI;
                 if (_ui.m_suitShow.data == null)
                 {
@@ -113,7 +113,7 @@ namespace GFGGame
                 {
                     dressUpObjUI.Dispose();
                 }
-                _ui.m_suitName.visible = false;
+                _ui.m_desc.visible = false;
                 _ui.m_suitShow.data = null;
                 _ui.m_playerImage.texture = MatchingCompetitionDataManager.Instance.MyNtextture;
             }

BIN
GameClient/Assets/ResIn/UI/MatchingCompetition/MatchingCompetition_fui.bytes