Преглед изворни кода

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

zouyong пре 5 година
родитељ
комит
76a7c5b8c2

+ 3 - 3
assets/resources/game/prefab/game.prefab

@@ -3308,7 +3308,7 @@
         "__id__": 97
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 100
@@ -3554,7 +3554,7 @@
         "__id__": 105
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 108
@@ -3800,7 +3800,7 @@
         "__id__": 113
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 116

+ 84 - 78
assets/resources/module/pigBank/pigBank.prefab

@@ -27,9 +27,6 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 62
-      },
-      {
         "__id__": 63
       },
       {
@@ -37,10 +34,13 @@
       },
       {
         "__id__": 65
+      },
+      {
+        "__id__": 66
       }
     ],
     "_prefab": {
-      "__id__": 66
+      "__id__": 67
     },
     "_opacity": 255,
     "_color": {
@@ -2041,21 +2041,83 @@
     "_parent": {
       "__id__": 1
     },
-    "_children": [],
+    "_children": [
+      {
+        "__id__": 58
+      }
+    ],
     "_active": true,
     "_components": [
       {
-        "__id__": 58
-      },
+        "__id__": 61
+      }
+    ],
+    "_prefab": {
+      "__id__": 62
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 150,
+      "height": 150
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        303.19,
+        464.26,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        0
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "关闭按钮",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 57
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
       {
         "__id__": 59
-      },
-      {
-        "__id__": 60
       }
     ],
     "_prefab": {
-      "__id__": 61
+      "__id__": 60
     },
     "_opacity": 255,
     "_color": {
@@ -2079,8 +2141,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        303.19,
-        464.26,
+        0,
+        0,
         0,
         0,
         0,
@@ -2109,7 +2171,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 57
+      "__id__": 58
     },
     "_enabled": true,
     "_materials": [
@@ -2137,72 +2199,15 @@
     "_id": ""
   },
   {
-    "__type__": "cc.Button",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 57
-    },
-    "_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__": "7bbb4b09-3827-4c5b-aaf8-cc1c4c360a22"
     },
-    "_N$normalSprite": null,
-    "_N$pressedSprite": null,
-    "pressedSprite": null,
-    "_N$hoverSprite": null,
-    "hoverSprite": null,
-    "_N$disabledSprite": null,
-    "_N$target": null,
-    "_id": ""
+    "fileId": "83B0n5bddJMrjg+YWK51Xq",
+    "sync": false
   },
   {
     "__type__": "cdc50kCRVVBa5gcp4XXxVO+",
@@ -2215,6 +2220,7 @@
     "node_panel": {
       "__id__": 1
     },
+    "transition_type": 3,
     "onComplete": [],
     "_id": ""
   },

+ 1 - 1
assets/script/game/data/GameData.ts

@@ -258,7 +258,7 @@ type PlayerInfoType = {
     /** 自定义不需要校验的数据 */
     gameUserData: object,
     /** 今日是否有签到 */
-    isSignInToday: boolean,
+    isSignInToday: number,
     /** 存钱罐存款 */
     piggyBank: number,
     /** 存钱罐能否提现 */

+ 1 - 1
assets/script/game/data/module/CashNormalData.ts

@@ -5,7 +5,7 @@ import { Data } from "../../../mk/data/Data";
  */
 export class CashNormalData extends Data {
     public init() {
-        this.initTestData();// 假数据
+        // this.initTestData();// 假数据
         // 提现记录数据
         this.getRecord()
     }

+ 4 - 5
assets/script/game/data/module/SignData.ts

@@ -19,12 +19,12 @@ export class SignData extends Data {
             });
             this.c_sign = gData.gameData.configs.SignIn;
         }
-        // 服务端数据不对
-        // this.sign_last_bar = gData.gameData.gameData.signInDay;
-        // this.sign_can = gData.gameData.gameData.isSignInToday;
+        // 服务端数据
+        this.sign_last_bar = gData.gameData.gameData.signInDay;
+        this.sign_can = gData.gameData.gameData.isSignInToday;
 
         // 客户端测试数据
-        this.sign_last_bar = gData.gameData.getProp(GameProp.sign_last_bar);
+        // this.sign_last_bar = gData.gameData.getProp(GameProp.sign_last_bar);
         // this.sign_can = gData.gameData.getProp(GameProp.sign_can);
     }
 
@@ -145,7 +145,6 @@ export class SignData extends Data {
         // 奖励展示
         let reward_data = this.c_sign[this.sign_last_bar - 1];
         if (reward_data.rewardType === RewardType.redBag) {
-            gData.reward.lid_type = gData.reward.type_lid.none;// 无盖子类型
             gData.reward.data = [reward_data];// 数据列表
             mk.ui.openPanel('module/reward/reward')
         } else if (reward_data.rewardType === RewardType.rmb || reward_data.rewardType === RewardType.pigRmb) {

+ 4 - 2
assets/script/game/module/redBagCode/RedBagCodeItem.ts

@@ -16,7 +16,7 @@ export default class RedBagCodeItem extends cc.Component {
     @property({ displayName: 'lbl毛币', type: cc.Label })
     private lbl_rmb: cc.Label = null;
 
-
+    private item_data: TCashList = null;
     /**
      * 初始化数据
      */
@@ -28,6 +28,7 @@ export default class RedBagCodeItem extends cc.Component {
      * 初始化样式
      */
     private initItem(item_data: TCashList) {
+        this.item_data = item_data;
         this.lbl_rmb.string = item_data.amount + '元';
         this.lbl_time.string = mk.time.getNowDayString(item_data.applyTime * 1000);
         this.lbl_code.string = item_data.withdrawalCode ? '红包码:' + item_data.withdrawalCode : '';
@@ -37,7 +38,8 @@ export default class RedBagCodeItem extends cc.Component {
      * 复制按钮
      */
     private clickCopy() {
-        JsbSystem.setClipboard('AABBAA')
+        JsbSystem.setClipboard(this.item_data.withdrawalCode)
+        mk.tip.pop('复制成功')
     }
     // update (dt) {}
 }

+ 2 - 2
assets/script/game/module/reward/Reward.ts

@@ -184,8 +184,8 @@ export default class Reward extends cc.Component {
      * 飞coin动画
      */
     private flyCoinAnim() {
-        gData.reward.data = [{ rewardType: 3 }]// 测试
-
+        // gData.reward.data = [{ rewardType: 3 }]// 测试
+        if (!gData.reward.data || !gData.reward.data.length) return;
         let target_node = gData.gameData.gameStyle.icon_hb;
         if (gData.reward.data[0].rewardType == RewardType.redBag) {
             target_node = gData.gameData.gameStyle.icon_hb;

+ 9 - 9
assets/script/mk/system/TipSystem.ts

@@ -7,23 +7,23 @@ const { ccclass, property } = cc._decorator;
  */
 export default class TipSystem extends cc.Component {
     @property({ type: cc.Integer, displayName: "飘动时间" })
-    tween_time: number = 1;
+    private tween_time: number = 1;
     @property({ type: cc.Integer, displayName: "开始坐标x" })
-    src_x: number = 0;
+    private src_x: number = 0;
     @property({ type: cc.Integer, displayName: "开始坐标y" })
-    src_y: number = 0;
+    private src_y: number = 0;
     @property({ type: cc.Integer, displayName: "目标坐标x" })
-    tar_x: number = 0;
+    private tar_x: number = 0;
     @property({ type: cc.Integer, displayName: "目标坐标y" })
-    tar_y: number = 200;
+    private tar_y: number = 200;
     @property({ type: cc.Integer, displayName: "背景透明度" })
-    bg_opacity: number = 40;
+    private bg_opacity: number = 40;
     @property({ displayName: "背景颜色" })
-    bg_color = new cc.Color(200, 200, 200);
+    private bg_color = new cc.Color(200, 200, 200);
     @property({ displayName: "文本颜色" })
-    tip_color = new cc.Color(255, 255, 255);
+    private tip_color = new cc.Color(255, 255, 255);
     @property({ type: cc.Integer, displayName: "文本字体" })
-    tip_size: number = 40;
+    private tip_size: number = 40;
 
     onLoad() {
         mk.tip = this;