浏览代码

搭配赛清空道具摆放,后续修改

zhangyuqian 11 月之前
父节点
当前提交
8fab251cb7
共有 1 个文件被更改,包括 20 次插入5 次删除
  1. 20 5
      GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

+ 20 - 5
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -127,6 +127,7 @@ namespace GFGGame
             _equipSceneData = PhotographDataManager.Instance._equipSceneData;
 
             PhotographDataManager.Instance.itemGameObjs.Clear();
+            MatchingCompetitionDataManager.Instance.DressPropTransInfoDic.Clear();
             _itemGameObjs = PhotographDataManager.Instance.itemGameObjs;
             if (_sceneObject == null)
             {
@@ -160,7 +161,7 @@ namespace GFGGame
                     MatchingCompetitionDataManager.Instance.DressUpBgID = MyDressUpHelper.dressUpObj.bgId;
                     MatchingCompetitionDataManager.Instance.MathingDressDate.bgId = MatchingCompetitionDataManager.Instance.DressUpBgID;
                 }
-                await UpdateSceneTransform();
+                //await UpdateSceneTransform();
             }  
         }
 
@@ -836,7 +837,8 @@ namespace GFGGame
                     {
                         ViewManager.Hide<ModalStatusView>();
                         PromptController.Instance.ShowFloatTextPrompt("上传成功!");
-                        OnClickBtnBack();
+                        this.Hide();
+                        EventAgent.DispatchEvent(ConstMessage.CLOSE_PHOTOGRAPHVIEW);
                         ViewManager.GoBackFrom(typeof(DressUpView).FullName);
                     }
                     ViewManager.Hide<ModalStatusView>();
@@ -844,10 +846,23 @@ namespace GFGGame
             }
         }
         private void OnClickBtnBack()
-        {
-            this.Hide();
+        {           
             //ViewManager.Show<DressUpView>();
-            EventAgent.DispatchEvent(ConstMessage.CLOSE_PHOTOGRAPHVIEW);
+            if (_ui.m_c1.selectedIndex == 2)
+            {
+                AlertUI.Show("返回将清空搭配道具,是否确定返回?")
+                .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
+                {
+                    this.Hide();
+                    EventAgent.DispatchEvent(ConstMessage.CLOSE_PHOTOGRAPHVIEW);
+                });
+             }
+            else
+            {
+                this.Hide();
+                EventAgent.DispatchEvent(ConstMessage.CLOSE_PHOTOGRAPHVIEW);
+            }
+            
         }
         protected override void OnHide()
         {