Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

zouyong 5 лет назад
Родитель
Сommit
adec9c408d

Разница между файлами не показана из-за своего большого размера
+ 132 - 315
assets/resources/game/prefab/game.prefab


+ 141 - 0
assets/resources/game/prefab/nodeRedPoint.prefab

@@ -0,0 +1,141 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "nodeRedPoint",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 25,
+      "height": 25
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "f57ce631-4ef4-46a2-88ea-8d1ac1c03b76"
+    },
+    "_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.Animation",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "_defaultClip": {
+      "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+    },
+    "_clips": [
+      {
+        "__uuid__": "1c7cfdae-7b6c-46a5-9085-2fa8aa684ac7"
+      }
+    ],
+    "playOnLoad": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f88b1639-f17d-4814-85b9-a3d3220bb997"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/game/prefab/nodeRedPoint.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.9",
+  "uuid": "f88b1639-f17d-4814-85b9-a3d3220bb997",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

BIN
assets/resources/game/texture/main/hongdian.png


+ 36 - 0
assets/resources/game/texture/main/hongdian.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "97362c6b-d150-4ca6-abf1-ff5eb838d0d0",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 25,
+  "height": 25,
+  "platformSettings": {},
+  "subMetas": {
+    "hongdian": {
+      "ver": "1.0.4",
+      "uuid": "f57ce631-4ef4-46a2-88ea-8d1ac1c03b76",
+      "rawTextureUuid": "97362c6b-d150-4ca6-abf1-ff5eb838d0d0",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 25,
+      "height": 25,
+      "rawWidth": 25,
+      "rawHeight": 25,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 40 - 10
assets/resources/module/moreGame/moreGame.prefab

@@ -31,10 +31,13 @@
       },
       {
         "__id__": 55
+      },
+      {
+        "__id__": 56
       }
     ],
     "_prefab": {
-      "__id__": 56
+      "__id__": 57
     },
     "_opacity": 255,
     "_color": {
@@ -702,7 +705,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 0,
-      "height": 0
+      "height": -1.1368683772161603e-13
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -714,7 +717,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        508.869,
+        508.8690000000001,
         0,
         0,
         0,
@@ -1105,7 +1108,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 730,
-      "height": 1021.9999999999999
+      "height": 1021.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1117,7 +1120,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -63.495000000000005,
+        -63.49500000000012,
         0,
         0,
         0,
@@ -1176,7 +1179,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 730,
-      "height": 1021.9999999999999
+      "height": 1021.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1188,7 +1191,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        -510.99999999999994,
+        -510.9999999999999,
         0,
         0,
         0,
@@ -1243,7 +1246,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 730,
-      "height": 169.99999999999983
+      "height": 169.99999999999977
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1317,7 +1320,7 @@
     "_layoutSize": {
       "__type__": "cc.Size",
       "width": 730,
-      "height": 169.99999999999983
+      "height": 169.99999999999977
     },
     "_resize": 1,
     "_N$layoutType": 2,
@@ -1504,7 +1507,7 @@
     "_enabled": true,
     "alignMode": 1,
     "_target": null,
-    "_alignFlags": 1,
+    "_alignFlags": 5,
     "_left": 375,
     "_right": 375,
     "_top": 158.13099999999997,
@@ -1876,6 +1879,33 @@
     "_id": ""
   },
   {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": -375,
+    "_right": 375,
+    "_top": 667,
+    "_bottom": -667,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 750,
+    "_originalHeight": 1334,
+    "_id": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 2 - 0
assets/script/game/data/GameData.ts

@@ -267,6 +267,7 @@ class PlayerProp {
         this._piggyBank = value;
         gData.gameData.init_coin = true;
         gData.pigbank.init_data = true;
+        gData.gameData.init_red_point = true;
     }
     get piggyBank(): number {
         return this._piggyBank;
@@ -306,6 +307,7 @@ class PlayerProp {
     set redMoney(value: number) {
         this._redMoney = value;
         gData.gameData.init_coin = true;
+        gData.gameData.init_red_point = true;
     }
     get redMoney(): number {
         return this._redMoney;

+ 2 - 1
assets/script/game/data/module/PigBankData.ts

@@ -16,6 +16,7 @@ export class PigBankData extends Data {
      * 数据初始化
      */
     public init() {
+        this.cash_min_limit = gData.gameData.configs.ServerConfig.PiggyBankCashMoney;
     }
 
     /** 标志位:是否需要刷新数据 */
@@ -54,7 +55,7 @@ export class PigBankData extends Data {
      * 红点功能
      */
     public redPoint(): boolean {
-        let bool = !!gData.gameData.gameData.isWithdrawable;
+        let bool = !!gData.gameData.gameData.isWithdrawable && gData.gameData.gameData.piggyBank >= this.cash_min_limit;
         return bool;
     }
 }

+ 18 - 2
assets/script/game/data/module/RedBagCashData.ts

@@ -35,7 +35,7 @@ export class RedBagCashData extends Data {
     /** 配置表数据 */
     public c_data: Array<CDataType> = [];
 
-    private _cash_bar: number = 0;
+    private _cash_bar: number = 1;
     /** 提现进度 */
     set cash_bar(value: number) {
         this._cash_bar = value;
@@ -59,8 +59,11 @@ export class RedBagCashData extends Data {
         let response = await mk.http.sendData('cashUsual', data);
         if (response.errcode != 0) {
             mk.tip.pop(response.errmsg);
+            mk.console.logSingle('提现index', cash_index);
+            mk.console.logSingle('提现错误内容:', response);
             return;
         }
+        cc.log('红包提现成功')
         let r_data = response.data;
         if (r_data.CashMode == 0) {//星云打款
         }
@@ -90,7 +93,7 @@ export class RedBagCashData extends Data {
         const l_count = this.c_data.length;
         let index = 0;
         for (let i = 0; i < l_count; i++) {
-            if (this.c_data[index].index <= gData.redBagCash.cash_bar) {
+            if (this.c_data[index].index < gData.redBagCash.cash_bar) {
                 let item_data = this.c_data.splice(index, 1);
                 this.c_data.push(item_data[0]);
                 index--;
@@ -136,6 +139,19 @@ export class RedBagCashData extends Data {
         }
         this.init_list = true;
     }
+
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        const redbag_count = gData.gameData.gameData.redMoney;
+        const d_count = this.c_data.length;
+        for (let i = 0; i < d_count; i++) {
+            if (this.c_data[i].index < gData.redBagCash.cash_bar) continue;// 已提现
+            if (redbag_count >= this.c_data[i].type_value) return true;// 可提现
+        }
+        return false;
+    }
 }
 /** 配置表数据内容 */
 export type CDataType = {

+ 3 - 0
assets/script/game/game/Game.ts

@@ -11,6 +11,8 @@ export class RedPoinNode {
     node_sign: cc.Node = null;
     @property({ type: cc.Node, displayName: "存钱罐" })
     node_pigbank: cc.Node = null;
+    @property({ type: cc.Node, displayName: "红包提现" })
+    node_redbagCash: cc.Node = null;
     @property({ type: cc.Node, displayName: "福袋" })
     node_blessingBag: cc.Node = null;
     @property({ type: cc.Node, displayName: "转盘" })
@@ -168,6 +170,7 @@ export default class Game extends cc.Component {
     private initRedPoint() {
         this.nodeRedPoint.node_sign.active = gData.sign.redPoint();
         this.nodeRedPoint.node_pigbank.active = gData.pigbank.redPoint();
+        this.nodeRedPoint.node_redbagCash.active = gData.redBagCash.redPoint();
         this.nodeRedPoint.node_turnable.active = gData.turnable.redPoint();
         this.nodeRedPoint.node_blessingBag.active = gData.blessingBag.redPoint();
         this.nodeRedPoint.node_redeem.active = gData.redeem.redPoint();

+ 1 - 2
assets/script/game/module/redBagCash/RedBagCashItem.ts

@@ -48,7 +48,7 @@ export default class RedBagCashItem extends cc.Component {
         rmb_value = rmb_value > 1 ? rmb_value : parseFloat(rmb_value.toFixed(2))
         this.lbl_rmb_value.string = rmb_value + '元';
 
-        if (this.item_data.index <= gData.redBagCash.cash_bar) {
+        if (this.item_data.index < gData.redBagCash.cash_bar) {
             // 已提现
             this.node_none.active = true;
             this.node_lock.active = false;
@@ -78,7 +78,6 @@ export default class RedBagCashItem extends cc.Component {
             return;
         }
         gData.redBagCash.cashOP();
-        cc.log('红包现成功')
     }
 
 }

BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-hdpi/ic_launcher.png


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-ldpi/ic_launcher.png


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-mdpi/ic_launcher.png


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xhdpi/ic_launcher.png


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xxhdpi/ic_launcher.png


BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/res/mipmap-xxxhdpi/ic_launcher.png


Некоторые файлы не были показаны из-за большого количества измененных файлов