zhaoyang 3 лет назад
Родитель
Сommit
2e44aa3310
1 измененных файлов с 9 добавлено и 3 удалено
  1. 9 3
      GameClient/Assets/Game/HotUpdate/Controller/RedDotController.cs

+ 9 - 3
GameClient/Assets/Game/HotUpdate/Controller/RedDotController.cs

@@ -14,7 +14,13 @@ namespace GFGGame
 
             if (isRed)
             {
-                if (parentCom.GetChild("comResDot") != null) return;
+                if (parentCom.GetChild("comResDot") != null)
+                {
+                    comRedDot = parentCom.GetChild("comResDot").asCom;
+                    comRedDot.SetPosition(parentCom.width - comRedDot.width + left, top, 0);
+
+                    return;
+                }
                 if (comRedDotPool.Count > 0)
                 {
                     comRedDot = comRedDotPool[0];
@@ -27,8 +33,8 @@ namespace GFGGame
                 parentCom.AddChild(comRedDot);
                 comRedDot.name = "comResDot";
                 comRedDot.SetPosition(parentCom.width - comRedDot.width + left, top, 0);
-                comRedDot.AddRelation(comRedDot, RelationType.TopExt_Top);
-                comRedDot.AddRelation(comRedDot, RelationType.RightExt_Right);
+                // comRedDot.AddRelation(comRedDot, RelationType.TopExt_Top);
+                // comRedDot.AddRelation(comRedDot, RelationType.RightExt_Right);
                 string path = ResPathUtil.GetCommonGameResPath(res == "" ? "zx_hogndian" : res);
                 GLoader loaIcon = comRedDot.GetChild("loaIcon").asLoader;
                 loaIcon.url = path;