future 1 年之前
父节点
当前提交
dc2e9ae10e
共有 3 个文件被更改,包括 18 次插入8 次删除
  1. 9 7
      assets/resources/ui/home.prefab
  2. 8 0
      assets/script/ui/home/home.ts
  3. 1 1
      assets/script/ui/home/home_bottom.ts

+ 9 - 7
assets/resources/ui/home.prefab

@@ -6812,7 +6812,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 490,
+      "y": 505,
       "z": 0
     },
     "_lrot": {
@@ -7801,7 +7801,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -124.316,
+      "y": -164,
       "z": 0
     },
     "_lrot": {
@@ -8294,7 +8294,9 @@
     "_disabledSprite": null,
     "_duration": 0.1,
     "_zoomScale": 1.2,
-    "_target": null,
+    "_target": {
+      "__id__": 326
+    },
     "_id": ""
   },
   {
@@ -8348,7 +8350,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 388.627,
-      "y": -117.595,
+      "y": -158,
       "z": 0
     },
     "_lrot": {
@@ -8610,7 +8612,7 @@
       "b": 153,
       "a": 255
     },
-    "_string": "",
+    "_string": "00:00:00",
     "_horizontalAlign": 0,
     "_verticalAlign": 1,
     "_actualFontSize": 30,
@@ -8791,7 +8793,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 400
+      "height": 430
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -8868,7 +8870,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 690
+      "height": 720
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 8 - 0
assets/script/ui/home/home.ts

@@ -52,6 +52,14 @@ export class home extends Component {
         this.top.getComponent(home_top).init()
         this.home_car.getComponent(home_car).updateCar()
         this.bottom.getComponent(home_bottom).init()
+        this.everyTenMinutesUpdate()
+    }
+
+    private everyTenMinutesUpdate() {
+        this.unscheduleAllCallbacks()
+        this.schedule(()=>{
+            this.bottom.getComponent(home_bottom).reloadCountryRankData()
+        },600)
     }
 }
 

+ 1 - 1
assets/script/ui/home/home_bottom.ts

@@ -61,7 +61,7 @@ export class home_bottom extends Component {
         this.countdown_node.getComponent(home_bottom_countdown).startTime()
     }
     
-    private reloadCountryRankData(){
+    public reloadCountryRankData(){
         GameManager.requestRankList(0, (d_content)=>{
             if(d_content.length>0) {
                 let rank_data = d_content[0]