Kaynağa Gözat

存钱罐界面

薛鸿潇 5 yıl önce
ebeveyn
işleme
4f302cdf24

+ 158 - 158
mk_framework/assets/resources/module/help/help.prefab

@@ -19,6 +19,9 @@
     "_children": [
       {
         "__id__": 2
+      },
+      {
+        "__id__": 8
       }
     ],
     "_active": true,
@@ -96,19 +99,16 @@
     "_children": [
       {
         "__id__": 3
-      },
-      {
-        "__id__": 8
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 11
+        "__id__": 6
       }
     ],
     "_prefab": {
-      "__id__": 12
+      "__id__": 7
     },
     "_opacity": 255,
     "_color": {
@@ -159,7 +159,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "关闭按钮",
+    "_name": "文字说明",
     "_objFlags": 0,
     "_parent": {
       "__id__": 2
@@ -169,16 +169,10 @@
     "_components": [
       {
         "__id__": 4
-      },
-      {
-        "__id__": 5
-      },
-      {
-        "__id__": 6
       }
     ],
     "_prefab": {
-      "__id__": 7
+      "__id__": 5
     },
     "_opacity": 255,
     "_color": {
@@ -190,8 +184,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 53,
-      "height": 49
+      "width": 500,
+      "height": 700
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -202,8 +196,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        303.19,
-        464.26,
+        0,
+        -63.193,
         0,
         0,
         0,
@@ -211,7 +205,7 @@
         1,
         1,
         1,
-        0
+        1
       ]
     },
     "_eulerAngles": {
@@ -228,7 +222,7 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Sprite",
+    "__type__": "cc.Label",
     "_name": "",
     "_objFlags": 0,
     "node": {
@@ -242,103 +236,60 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "af2a7472-1f78-414a-8307-5ac0edead809"
-    },
-    "_type": 0,
-    "_sizeMode": 1,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
+    "_string": "帮助界面文本说明",
+    "_N$string": "帮助界面文本说明",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 2,
+    "_N$cacheMode": 0,
     "_id": ""
   },
   {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 3
-    },
-    "_enabled": true,
-    "_normalMaterial": null,
-    "_grayMaterial": null,
-    "duration": 0.1,
-    "zoomScale": 1.2,
-    "clickEvents": [],
-    "_N$interactable": true,
-    "_N$enableAutoGrayEffect": false,
-    "_N$transition": 3,
-    "transition": 3,
-    "_N$normalColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_N$pressedColor": {
-      "__type__": "cc.Color",
-      "r": 211,
-      "g": 211,
-      "b": 211,
-      "a": 255
-    },
-    "pressedColor": {
-      "__type__": "cc.Color",
-      "r": 211,
-      "g": 211,
-      "b": 211,
-      "a": 255
-    },
-    "_N$hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "hoverColor": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
     },
-    "_N$disabledColor": {
-      "__type__": "cc.Color",
-      "r": 124,
-      "g": 124,
-      "b": 124,
-      "a": 255
+    "asset": {
+      "__uuid__": "60241a57-78e1-4090-aa94-5cd17ec5ebe1"
     },
-    "_N$normalSprite": null,
-    "_N$pressedSprite": null,
-    "pressedSprite": null,
-    "_N$hoverSprite": null,
-    "hoverSprite": null,
-    "_N$disabledSprite": null,
-    "_N$target": null,
-    "_id": ""
+    "fileId": "37sN6/TKNGcY20Qa3SjGaJ",
+    "sync": false
   },
   {
-    "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
+    "__type__": "cc.Widget",
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 3
+      "__id__": 2
     },
     "_enabled": true,
-    "node_panel": {
-      "__id__": 1
-    },
-    "onComplete": [],
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
     "_id": ""
   },
   {
@@ -349,25 +300,31 @@
     "asset": {
       "__uuid__": "60241a57-78e1-4090-aa94-5cd17ec5ebe1"
     },
-    "fileId": "cbILUNa3xJ4rRL3tcmEJ/J",
+    "fileId": "94yiGj0RFACpXt5xGEvfHf",
     "sync": false
   },
   {
     "__type__": "cc.Node",
-    "_name": "文字说明",
+    "_name": "关闭按钮",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 2
+      "__id__": 1
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
         "__id__": 9
+      },
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 11
       }
     ],
     "_prefab": {
-      "__id__": 10
+      "__id__": 12
     },
     "_opacity": 255,
     "_color": {
@@ -379,8 +336,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 500,
-      "height": 700
+      "width": 53,
+      "height": 49
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -391,8 +348,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        0,
-        -63.193,
+        303.19,
+        464.26,
         0,
         0,
         0,
@@ -400,7 +357,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -417,7 +374,7 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Label",
+    "__type__": "cc.Sprite",
     "_name": "",
     "_objFlags": 0,
     "node": {
@@ -431,60 +388,103 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_string": "帮助界面文本说明",
-    "_N$string": "帮助界面文本说明",
-    "_fontSize": 40,
-    "_lineHeight": 40,
-    "_enableWrapText": true,
-    "_N$file": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_batchAsBitmap": false,
-    "_styleFlags": 0,
-    "_underlineHeight": 0,
-    "_N$horizontalAlign": 1,
-    "_N$verticalAlign": 1,
-    "_N$fontFamily": "Arial",
-    "_N$overflow": 2,
-    "_N$cacheMode": 0,
+    "_spriteFrame": {
+      "__uuid__": "af2a7472-1f78-414a-8307-5ac0edead809"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
     "_id": ""
   },
   {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 8
     },
-    "asset": {
-      "__uuid__": "60241a57-78e1-4090-aa94-5cd17ec5ebe1"
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.2,
+    "clickEvents": [],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
     },
-    "fileId": "37sN6/TKNGcY20Qa3SjGaJ",
-    "sync": false
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": ""
   },
   {
-    "__type__": "cc.Widget",
+    "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 2
+      "__id__": 8
     },
     "_enabled": true,
-    "alignMode": 1,
-    "_target": null,
-    "_alignFlags": 45,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": 0,
-    "_verticalCenter": 0,
-    "_horizontalCenter": 0,
-    "_isAbsLeft": true,
-    "_isAbsRight": true,
-    "_isAbsTop": true,
-    "_isAbsBottom": true,
-    "_isAbsHorizontalCenter": true,
-    "_isAbsVerticalCenter": true,
-    "_originalWidth": 0,
-    "_originalHeight": 0,
+    "node_panel": {
+      "__id__": 1
+    },
+    "onComplete": [],
     "_id": ""
   },
   {
@@ -495,7 +495,7 @@
     "asset": {
       "__uuid__": "60241a57-78e1-4090-aa94-5cd17ec5ebe1"
     },
-    "fileId": "94yiGj0RFACpXt5xGEvfHf",
+    "fileId": "fa5LVaRQ1Pvo1vsCRpC3Ax",
     "sync": false
   },
   {
@@ -507,7 +507,7 @@
     },
     "_enabled": true,
     "lbl_desc": {
-      "__id__": 9
+      "__id__": 4
     },
     "_id": ""
   },

Dosya farkı çok büyük olduğundan ihmal edildi
+ 32 - 1462
mk_framework/assets/resources/module/pigBank/pigBank.prefab


BIN
mk_framework/assets/resources/module/pigBank/texture/icon_zhubi.png


+ 0 - 36
mk_framework/assets/resources/module/pigBank/texture/icon_zhubi.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "be83bd27-ad99-4bb3-9264-8589677a60d4",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 67,
-  "height": 69,
-  "platformSettings": {},
-  "subMetas": {
-    "icon_zhubi": {
-      "ver": "1.0.4",
-      "uuid": "e96518d9-bc84-454d-b976-1079e3fe676b",
-      "rawTextureUuid": "be83bd27-ad99-4bb3-9264-8589677a60d4",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 67,
-      "height": 69,
-      "rawWidth": 67,
-      "rawHeight": 69,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
mk_framework/assets/resources/module/pigBank/texture/pig.png


+ 0 - 36
mk_framework/assets/resources/module/pigBank/texture/pig.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "774b460c-56e6-4c9f-8ea4-4a15b56cc5f3",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 311,
-  "height": 305,
-  "platformSettings": {},
-  "subMetas": {
-    "pig": {
-      "ver": "1.0.4",
-      "uuid": "1c3e7e01-c4be-4b3c-b1a7-097da5e36458",
-      "rawTextureUuid": "774b460c-56e6-4c9f-8ea4-4a15b56cc5f3",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 311,
-      "height": 305,
-      "rawWidth": 311,
-      "rawHeight": 305,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

BIN
mk_framework/assets/resources/module/pigBank/texture/star.png


+ 0 - 36
mk_framework/assets/resources/module/pigBank/texture/star.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "3b9dfff4-aefd-4ebf-af62-5a0fef6a1be9",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 30,
-  "height": 34,
-  "platformSettings": {},
-  "subMetas": {
-    "star": {
-      "ver": "1.0.4",
-      "uuid": "30c5418f-5ec4-4f2d-826d-9ef390cd6a46",
-      "rawTextureUuid": "3b9dfff4-aefd-4ebf-af62-5a0fef6a1be9",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 30,
-      "height": 34,
-      "rawWidth": 30,
-      "rawHeight": 34,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

+ 13 - 5
mk_framework/assets/script/game/data/module/PigBankData.ts

@@ -1,16 +1,23 @@
 /**
  * 存钱罐数据
+ * - 提现描述显示:
+ * 1.判断是否可提,
+ *  可提显示“直接提现”
+ *  不可提判断存款是否满足提现最低限制
+ *      满足显示:“明日提现”,
+ *      不满足显示:“满x可提”
  * @author 
  */
 export class PigBankData {
+    /** 是否可提现 */
+    public cash_enable: boolean = false;
+    /** 当前存款 */
+    public cur_cash_count: number = 0.36;
+
     /** 提现最低限制 */
     public cash_min_limit: number = 0.3;
     /** 存款最高限制 */
     public cash_max_limit: number = 0.45;
-    /** 今日可提现数量 */
-    public cur_cash_count: number = 0.30;
-    /** 明日可提现数量 */
-    public next_cash_count: number = 0;
     /** 
      * 视频数最低限制 
      * 存钱罐提现次数*10【配置】,未满足视频数要求则不打款
@@ -19,8 +26,9 @@ export class PigBankData {
 
     /** 
      * 提现操作
+     * - 此处需要对接服务端数据
      */
     public cashOP() {
-        this.cur_cash_count = 0;
+        this.cash_enable = false;
     }
 }

+ 10 - 12
mk_framework/assets/script/game/module/module/pigBank/PigBank.ts

@@ -29,28 +29,26 @@ export default class PigBank extends cc.Component {
      * 提现描述展示
      */
     private initCashDesc() {
-        if (g.pigbank.cur_cash_count) {
+        if (g.pigbank.cash_enable) {
+            this.lbl_get_desc.string = '直接提现';
+            this.node_tip_anim.active = false;
+        } else {
+            this.node_tip_anim.active = true;
             if (g.pigbank.cur_cash_count >= g.pigbank.cash_min_limit) {
-                this.lbl_get_desc.string = '直接提现';
-                this.node_tip_anim.active = false;
+                this.lbl_get_desc.string = '明日可提现';
             } else {
-                this.lbl_get_desc.string = '满' + 0.3 + '元可提';
-                this.node_tip_anim.active = true;
+                this.lbl_get_desc.string = '满' + g.pigbank.cash_min_limit + '元可提';
             }
-            this.initDeposit(g.pigbank.cur_cash_count)
-        } else {
-            this.lbl_get_desc.string = '明日可提现';
-            this.initDeposit(g.pigbank.next_cash_count)
-            this.node_tip_anim.active = true;
         }
+        this.initDeposit()
     }
 
     /** 
      * 初始化存钱罐金额
      * - 精确到分
      */
-    private initDeposit(count = 0) {
-        const new_count = count.toFixed(2)
+    private initDeposit() {
+        const new_count = g.pigbank.cur_cash_count.toFixed(2)
         this.lbl_deposit.string = new_count + '元';
     }
 

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor