瀏覽代碼

修改探索红点

lanyunfei 9 小時之前
父節點
當前提交
a9d7024b68
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      assets/script/ui/BuildingUI.ts

+ 4 - 0
assets/script/ui/BuildingUI.ts

@@ -145,7 +145,10 @@ export class BuildingUI extends BaseUI {
         if (this.castleSkillNode.active) this.initCastleSkill()
         if (this.exploreNode.active) this.initExplore()
         cc.find('button_details', this.node).active = BUILDING.main == this.build.id || this.exploreNode.active //主城介绍、只有主城显示
+        this.showExploreToggleRed()
+    }
 
+    showExploreToggleRed() {
         //页签红点  探索
         cc.find('toggles/toggle2/red_dots', this.toggles).active =
             (this.build.exploreTimes > 0 || this.build.autoExploreTimes > 0) &&
@@ -372,6 +375,7 @@ export class BuildingUI extends BaseUI {
         Data.main.buildData[index] = buildData
         this.build = buildData
         this.initExplore()
+        this.showExploreToggleRed()
     }
 
     //网络事件=======================================