future 1 سال پیش
والد
کامیت
c99a6fc36c

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 485 - 92
assets/resources/ui/rank.prefab


+ 7 - 2
assets/script/GameManager.ts

@@ -13,12 +13,17 @@ export class GameManager extends Component {
     public static openId:string = 'asd'
     public static settingData:settingData = null
 
-    // 设置
-    public static getUserDefaultCarSf():SpriteFrame {
+    public static getUserDefaultHomeCarSf():SpriteFrame {
         let sf = imageCacheManager.getHomeCarImageById(userDataManager.user_car_list.default_car_id)
         return sf
     }
 
+    public static getUserDefaultRankCarSf():SpriteFrame {
+        let sf = imageCacheManager.getRankCarImageById(userDataManager.user_car_list.default_car_id)
+        return sf
+    }
+
+    // 设置
     public static getSettingData():settingData {
         if(GameManager.settingData!=null) {
             return GameManager.settingData

+ 6 - 0
assets/script/sdkUtil.ts

@@ -89,6 +89,12 @@ export class SdkUtil {
     // 分享游戏
     public static shareGame(title: string, call_back) {
         if(sys.platform == sys.Platform.BYTEDANCE_MINI_GAME) {
+            tt.shareAppMessage({
+                title: title,
+                desc: "测试描述",
+                success() { console.log("分享成功") },
+                fail(e) { console.log("分享失败",e) },
+              });
             call_back()
         } else if(sys.platform == sys.Platform.WECHAT_GAME) {
             title = title + '好刺激、好好玩'

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

@@ -8,7 +8,7 @@ export class home_car extends Component {
     @property(Node) spr_car:Node = null
     updateCar(){
         // console.log('当前用户默认car_id=',userDataManager.user_car_list.default_car_id)
-        this.spr_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultCarSf()
+        this.spr_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultHomeCarSf()
     }
 }
 

+ 27 - 19
assets/script/ui/rank/rank_my_info.ts

@@ -9,6 +9,8 @@ export class rank_my_info extends Component {
     @property(Node) img_weishangbang:Node = null
     @property(Node) icon_number_bg:Node = null
     @property(Node) icon_number_img:Node = null
+    @property(Node) icon_number_other_bg:Node = null
+    @property(Node) lab_number_other:Node = null
     @property(SpriteFrame) sf_rank_icon_1:SpriteFrame = null
     @property(SpriteFrame) sf_rank_icon_2:SpriteFrame = null
     @property(SpriteFrame) sf_rank_icon_3:SpriteFrame = null
@@ -19,33 +21,39 @@ export class rank_my_info extends Component {
     @property(Node) img_car:Node = null
 
     initView(data:rankData) {
-        if(data.number>0 && data.number<=3) {
-            this.img_weishangbang.active = false
-            this.icon_number_bg.active = true
-            switch (data.number) {
-                case 1:
-                    this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_1
-                    break;
-                case 2:
-                    this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_2
-                    break;
-                case 3:
-                    this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_3
-                    break;
-                default:
-                    break;
-            }
-        } else {
+        if(data.number==0) {
             this.img_weishangbang.active = true
             this.icon_number_bg.active = false
+            this.icon_number_other_bg.active = false
+        } else {
+            this.img_weishangbang.active = false
+            if(data.number<=3) {
+                this.icon_number_bg.active = true
+                switch (data.number) {
+                    case 1:
+                        this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_1
+                        break;
+                    case 2:
+                        this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_2
+                        break;
+                    case 3:
+                        this.icon_number_img.getComponent(Sprite).spriteFrame = this.sf_rank_icon_3
+                        break;
+                    default:
+                        break;
+                }
+            } else {
+                this.icon_number_other_bg.active = true
+                this.lab_number_other.getComponent(Label).string = data.number + ''
+            }
         }
-
+        
         tools.loadRemoteImg(data.avatarUrl, (r)=>{
             this.img_avatar.getComponent(Sprite).spriteFrame = r.sf
         })
         this.lab_nickname.getComponent(Label).string = data.nickName
         this.lab_score.getComponent(Label).string = data.score + ' 分'
-        this.img_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultCarSf()
+        this.img_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultRankCarSf()
     }
 }
 

BIN
assets/texture/ui/rank/rank_icon_number.png


+ 134 - 0
assets/texture/ui/rank/rank_icon_number.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1@6c48a",
+      "displayName": "rank_icon_number",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1@f9941",
+      "displayName": "rank_icon_number",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 110,
+        "height": 109,
+        "rawWidth": 110,
+        "rawHeight": 109,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -55,
+            -54.5,
+            0,
+            55,
+            -54.5,
+            0,
+            -55,
+            54.5,
+            0,
+            55,
+            54.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            109,
+            110,
+            109,
+            0,
+            0,
+            110,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -55,
+            -54.5,
+            0
+          ],
+          "maxPos": [
+            55,
+            54.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "06032f8f-00e8-4a99-bda7-7e2f3f8700f1@f9941"
+  }
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است