瀏覽代碼

强行把字体改为BMFont

sa03 6 年之前
父節點
當前提交
45fee512f1

+ 13 - 10
assets/font/FZLanTingHeiS-H-GB-Min.fnt

@@ -1,7 +1,7 @@
 info face="FZLTTHJW--GB1-0" size=40 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1
 common lineHeight=50 base=36 scaleW=256 scaleH=256 pages=1 packed=0
 page id=0 file="FZLanTingHeiS-H-GB-Min.png"
-chars count=25
+chars count=28
 char id=20806 x=1 y=1 width=46 height=46 xoffset=1 yoffset=-0 xadvance=40 page=0 chnl=0 letter="兆"
 char id=28385 x=48 y=1 width=45 height=46 xoffset=1 yoffset=-1 xadvance=40 page=0 chnl=0 letter="满"
 char id=20159 x=94 y=1 width=46 height=45 xoffset=1 yoffset=1 xadvance=40 page=0 chnl=0 letter="亿"
@@ -18,12 +18,15 @@ char id=48 x=37 y=94 width=35 height=44 xoffset=1 yoffset=1 xadvance=29 page=0 c
 char id=51 x=73 y=94 width=34 height=44 xoffset=2 yoffset=1 xadvance=29 page=0 chnl=0 letter="3"
 char id=24050 x=108 y=94 width=44 height=43 xoffset=3 yoffset=1 xadvance=40 page=0 chnl=0 letter="已"
 char id=86 x=153 y=94 width=42 height=43 xoffset=0 yoffset=1 xadvance=35 page=0 chnl=0 letter="V"
-char id=52 x=196 y=94 width=36 height=43 xoffset=1 yoffset=1 xadvance=30 page=0 chnl=0 letter="4"
-char id=50 x=1 y=139 width=34 height=43 xoffset=1 yoffset=1 xadvance=28 page=0 chnl=0 letter="2"
-char id=53 x=36 y=139 width=34 height=43 xoffset=1 yoffset=2 xadvance=29 page=0 chnl=0 letter="5"
-char id=76 x=71 y=139 width=34 height=43 xoffset=3 yoffset=1 xadvance=29 page=0 chnl=0 letter="L"
-char id=49 x=106 y=139 width=27 height=43 xoffset=1 yoffset=1 xadvance=23 page=0 chnl=0 letter="1"
-char id=55 x=134 y=139 width=34 height=42 xoffset=1 yoffset=2 xadvance=28 page=0 chnl=0 letter="7"
-char id=118 x=169 y=139 width=35 height=33 xoffset=0 yoffset=11 xadvance=27 page=0 chnl=0 letter="v"
-char id=46 x=205 y=139 width=16 height=16 xoffset=2 yoffset=28 xadvance=11 page=0 chnl=0 letter="."
-char id=32 x=222 y=139 width=0 height=0 xoffset=11 yoffset=56 xadvance=11 page=0 chnl=0 letter="space"
+char id=88 x=196 y=94 width=42 height=43 xoffset=0 yoffset=1 xadvance=35 page=0 chnl=0 letter="X"
+char id=52 x=1 y=139 width=36 height=43 xoffset=1 yoffset=1 xadvance=30 page=0 chnl=0 letter="4"
+char id=50 x=38 y=139 width=34 height=43 xoffset=1 yoffset=1 xadvance=28 page=0 chnl=0 letter="2"
+char id=53 x=73 y=139 width=34 height=43 xoffset=1 yoffset=2 xadvance=29 page=0 chnl=0 letter="5"
+char id=76 x=108 y=139 width=34 height=43 xoffset=3 yoffset=1 xadvance=29 page=0 chnl=0 letter="L"
+char id=49 x=143 y=139 width=27 height=43 xoffset=1 yoffset=1 xadvance=23 page=0 chnl=0 letter="1"
+char id=55 x=171 y=139 width=34 height=42 xoffset=1 yoffset=2 xadvance=28 page=0 chnl=0 letter="7"
+char id=120 x=206 y=139 width=36 height=33 xoffset=0 yoffset=11 xadvance=29 page=0 chnl=0 letter="x"
+char id=118 x=1 y=183 width=35 height=33 xoffset=0 yoffset=11 xadvance=27 page=0 chnl=0 letter="v"
+char id=58 x=37 y=183 width=16 height=33 xoffset=2 yoffset=11 xadvance=12 page=0 chnl=0 letter=":"
+char id=46 x=54 y=183 width=16 height=16 xoffset=2 yoffset=28 xadvance=11 page=0 chnl=0 letter="."
+char id=32 x=71 y=183 width=0 height=0 xoffset=11 yoffset=56 xadvance=11 page=0 chnl=0 letter="space"

二進制
assets/font/FZLanTingHeiS-H-GB-Min.png


+ 4 - 4
assets/font/FZLanTingHeiS-H-GB-Min.png.meta

@@ -12,12 +12,12 @@
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": -11,
-      "offsetY": 36.5,
+      "offsetX": -7,
+      "offsetY": 19.5,
       "trimX": 1,
       "trimY": 1,
-      "width": 232,
-      "height": 181,
+      "width": 240,
+      "height": 215,
       "rawWidth": 256,
       "rawHeight": 256,
       "borderTop": 0,

+ 12 - 10
assets/prefabs/level_home_item.prefab

@@ -387,7 +387,7 @@
     "_position": {
       "__type__": "cc.Vec2",
       "x": 0,
-      "y": 0
+      "y": 3
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -1461,7 +1461,7 @@
     "_scaleY": 1,
     "_position": {
       "__type__": "cc.Vec2",
-      "x": 60.400000000000006,
+      "x": 58.8,
       "y": 1
     },
     "_skewX": 0,
@@ -1543,8 +1543,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 50,
-      "height": 25
+      "width": 58,
+      "height": 16
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -1571,13 +1571,15 @@
     },
     "_enabled": true,
     "_useOriginalSize": false,
-    "_actualFontSize": 20,
-    "_fontSize": 20,
-    "_lineHeight": 25,
+    "_actualFontSize": 16,
+    "_fontSize": 16,
+    "_lineHeight": 40,
     "_enableWrapText": true,
-    "_N$file": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
+    "_N$file": {
+      "__uuid__": "5c54c001-9dcf-49e1-a061-f5eec186a5d0"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 1,
     "_N$string": "00:00",
     "_N$horizontalAlign": 1,
     "_N$verticalAlign": 1,

+ 21 - 14
assets/prefabs/level_home_prop_item.prefab

@@ -160,7 +160,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "New RichText",
+    "_name": "name_text",
     "_objFlags": 0,
     "_parent": {
       "__id__": 1
@@ -193,8 +193,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 9,
-      "height": 20
+      "width": 0,
+      "height": 18
     },
     "_rotationX": 0,
     "_rotationY": 0,
@@ -203,7 +203,7 @@
     "_position": {
       "__type__": "cc.Vec2",
       "x": 0,
-      "y": -33.9
+      "y": -33
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -213,21 +213,28 @@
     "groupIndex": 0
   },
   {
-    "__type__": "cc.RichText",
+    "__type__": "cc.Label",
     "_name": "",
     "_objFlags": 0,
     "node": {
       "__id__": 5
     },
     "_enabled": true,
-    "_N$string": "<b><color=#ffffff>0</c></b>",
-    "_N$horizontalAlign": 1,
-    "_N$fontSize": 16,
-    "_N$font": null,
-    "_N$maxWidth": 0,
-    "_N$lineHeight": 20,
-    "_N$imageAtlas": null,
-    "_N$handleTouchEvent": true
+    "_useOriginalSize": false,
+    "_actualFontSize": 18,
+    "_fontSize": 18,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": {
+      "__uuid__": "5c54c001-9dcf-49e1-a061-f5eec186a5d0"
+    },
+    "_isSystemFontUsed": false,
+    "_spacingX": 1,
+    "_N$string": "",
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 0,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0
   },
   {
     "__type__": "cc.PrefabInfo",
@@ -251,7 +258,7 @@
     "propSprite": {
       "__id__": 3
     },
-    "nameRichText": {
+    "nameText": {
       "__id__": 6
     }
   },

File diff suppressed because it is too large
+ 138 - 227
assets/scene/game.fire


+ 3 - 3
assets/scripts/levelHome/LevelHomePropItem.js

@@ -10,7 +10,7 @@ cc.Class({
        
         propSprite: cc.Sprite,
 
-        nameRichText: cc.RichText,
+        nameText: cc.Label,
     },
 
     init(buildingId, propData, pickupCallback) {
@@ -27,13 +27,13 @@ cc.Class({
             console.log(err);
         });
 
-        this.nameRichText.string = `<b><color=#ffffff>X${this.propData.count}</c></b>`;
+        this.nameText.string = `x${this.propData.count}`;
 
         this.pickupCallback = pickupCallback;
     },
 
     updateProp(propData) {
-        this.nameRichText.string = `<b><color=#ffffff>X${propData.count}</c></b>`;
+        this.nameText.string = `x${propData.count}`;
     },
 
     // LIFE-CYCLE CALLBACKS:

Some files were not shown because too many files changed in this diff