Эх сурвалжийг харах

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

leiyasi 1 жил өмнө
parent
commit
a0171f59e5

+ 7 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjUI.cs

@@ -21,7 +21,8 @@ namespace GFGGame
 
         public void ResetSceneObj(int scale = 100, bool needSetMask = false, bool showSceneType = true, GameObject roleObj = null, bool showBg = true)
         {
-            sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath(this.prefabName));
+            if(sceneObject == null)
+                sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath(this.prefabName));
             sceneObject.transform.localScale = new Vector3(scale, scale, scale);
             dressUpObj.setSceneObj(sceneObject, needSetMask, showSceneType, roleObj, showBg);
             Timers.inst.AddUpdate(OnUpdate);
@@ -33,6 +34,11 @@ namespace GFGGame
             wrapper.wrapTarget = sceneObject;
         }
 
+        public void SetScale(Vector2 vector2)
+        {
+            wrapper.scale = vector2;
+        }
+
         public void Dispose()
         {
             if (sceneObject != null)

+ 15 - 0
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -504,7 +504,22 @@ namespace GFGGame
                     }
                 }
             }
+
+            SetGoLayers(gameObj, 0);
         }
+
+
+        private static void SetGoLayers(GameObject gameObject, int layer)
+        {
+            if (gameObject == null || gameObject.layer == layer)
+                return;
+
+            var helperTransformList = gameObject.GetComponentsInChildren<Transform>(true);
+            int cnt = helperTransformList.Length;
+            for (int i = 0; i < cnt; i++)
+                helperTransformList[i].gameObject.layer = layer;
+        }
+
     }
 
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Sound/MusicManager.cs

@@ -101,8 +101,8 @@ namespace GFGGame
         }
         public void Stop()
         {
-            handle.Release();
-            player.Stop();
+            handle?.Release();
+            player?.Stop();
         }
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Field/FieldView.cs

@@ -39,7 +39,7 @@ namespace GFGGame
             _ui = UI_FieldUI.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
-            isReturnView = true;
+            //isReturnView = true;
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
             // _ui.m_btnGo.onClick.Add(OnClickBtnGo);

+ 5 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -27,6 +27,11 @@ namespace GFGGame
 
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+
             if (_valueBarController != null)
             {
                 _valueBarController.Dispose();
@@ -47,11 +52,6 @@ namespace GFGGame
                 _dressUpObjUIChangXi.Dispose();
                 _dressUpObjUIChangXi = null;
             }
-            EffectUIPool.Recycle(_effectUI1);
-            _effectUI1 = null;
-            EffectUIPool.Recycle(_effectUI2);
-            _effectUI2 = null;
-
             if (_ui != null)
             {
                 _ui.Dispose();

+ 10 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -969,6 +969,7 @@ namespace GFGGame
             GObject obj = context.sender as GObject;
             AdCfg adCfg = obj.data as AdCfg;
             object[] param = null;
+            int jumpIndex = 0;
             if (adCfg.jumpId == nameof(LimitChargeView))
             {
                 param = new object[] { adCfg.activityId };
@@ -977,7 +978,15 @@ namespace GFGGame
             {
                 param = new object[] { adCfg.activityId };
             }
-            ViewManager.Show($"GFGGame.{adCfg.jumpId}", param);
+            if (adCfg.jumpId == nameof(LuckyBoxView))
+            {
+                jumpIndex = adCfg.jumpParamArr[0];
+            }
+
+            if(jumpIndex != 0)
+                ViewManager.Show($"GFGGame.{adCfg.jumpId}", jumpIndex);
+            else
+                ViewManager.Show($"GFGGame.{adCfg.jumpId}", param);
         }
         private void OnListAdScrollEnd()
         {

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Notice/NoticeSystemShowView.cs

@@ -54,6 +54,7 @@ namespace GFGGame
         private void GoBackFrom()
         {
             ViewManager.GoBackFrom(typeof(NoticeSystemShowView).Name);
+            ViewManager.Show<NoticeView>();
         }
     }
 }