ソースを参照

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

kaka 5 年 前
コミット
55f672f226

ファイルの差分が大きいため隠しています
+ 435 - 105
assets/resources/game/prefab/game.prefab


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


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

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "e965e12a-5549-461a-b545-ae931736dd65",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 32,
+  "height": 32,
+  "platformSettings": {},
+  "subMetas": {
+    "default_radio_button_off": {
+      "ver": "1.0.4",
+      "uuid": "c66d31a0-72c4-4f57-a80a-fdbb65f657cc",
+      "rawTextureUuid": "e965e12a-5549-461a-b545-ae931736dd65",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 3,
+      "trimY": 3,
+      "width": 26,
+      "height": 26,
+      "rawWidth": 32,
+      "rawHeight": 32,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 2 - 2
assets/resources/module/guide/guide.prefab

@@ -180,7 +180,7 @@
     "_prefab": {
       "__id__": 7
     },
-    "_opacity": 120,
+    "_opacity": 180,
     "_color": {
       "__type__": "cc.Color",
       "r": 0,
@@ -1164,7 +1164,7 @@
     "asset": {
       "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
     },
-    "fileId": "dbN3oWWehNqovhIw60cRq1",
+    "fileId": "61shDUdxBJl4Wej3Bami/Z",
     "sync": false
   },
   {

ファイルの差分が大きいため隠しています
+ 2 - 2
assets/resources/spine/game/changjing.json


BIN
assets/resources/spine/game/changjing.png


+ 7 - 2
assets/script/before/GamePlay.ts

@@ -175,10 +175,15 @@ export default class GamePlay extends cc.Component {
 
     private clickGuide(data: string) {
         if (data == "1_2") {//点击即可消除哦!
-            this.cellItemDic[0][1].onClick();
+            this.cellItemDic[0][0] && this.cellItemDic[0][0].onClick();
+            this.cellItemDic[0][1] && this.cellItemDic[0][1].onClick();
         }
         else if (data == "1_3") {//再点击一次增加大量进度哦
-            this.cellItemDic[1][0].onClick();
+            this.cellItemDic[1][0] && this.cellItemDic[1][0].onClick();
+            this.cellItemDic[1][1] && this.cellItemDic[1][1].onClick();
+            this.cellItemDic[1][2] && this.cellItemDic[1][2].onClick();
+            this.cellItemDic[1][3] && this.cellItemDic[1][3].onClick();
+            this.cellItemDic[1][4] && this.cellItemDic[1][4].onClick();
         }
     }
 

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

@@ -31,7 +31,7 @@ export class AppData {
     /** 安卓版本号 */
     public androidVersion: string = '';
 
-    public mac: string = '5e:35:e1:12:b3:23,f6:60:e4:1a:b7:27';
+    public mac: string = '1e:01:e4:13:b3:23,f6:60:e4:1a:b7:27';
 
     /** 设备信息 */
     public machineInfo = {

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

@@ -29,6 +29,9 @@ export class GameData {
     /** 标志位:刷新主界面头像 */
     public init_head: boolean = false;
 
+    /** 标志位:刷新主界面红点 */
+    public init_red_point: boolean = true;
+
     public props: Map<number, number> = new Map<number, number>();
 
     public pools = [
@@ -251,6 +254,7 @@ class PlayerProp {
     set isSignInToday(value: number) {
         this._isSignInToday = value;
         gData.sign.init_data = true;
+        gData.gameData.init_red_point = true;
     }
     get isSignInToday(): number {
         return this._isSignInToday;
@@ -278,6 +282,7 @@ class PlayerProp {
         if (this._isWithdrawable != value) {
             this._isWithdrawable = value;
             gData.pigbank.init_data = true;
+            gData.gameData.init_red_point = true;
         }
     }
     get isWithdrawable(): number {

+ 0 - 6
assets/script/game/data/RedPointData.ts

@@ -1,6 +0,0 @@
-/**
- * 红点数据
- * @author 薛鸿潇
- */
-export default class RedPointData extends cc.Component {
-}

+ 0 - 9
assets/script/game/data/RedPointData.ts.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.8",
-  "uuid": "996c3973-5e93-406e-b879-eb2875d7e2f2",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 7 - 0
assets/script/game/data/module/BlessingBagData.ts

@@ -138,6 +138,13 @@ export class BlessingBagData extends Data {
         //     AdM.onSendEvent('VideoCashBig_' + response.data.UserRedMoneyInfo.preLargeAmountCashId, ' 视频红包大额提现第' + response.data.UserRedMoneyInfo.preLargeAmountCashId + '档领取成功', 'VideoCashBig');
         // }
     }
+
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        return false;
+    }
 }
 
 

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

@@ -41,7 +41,7 @@ export class GuideData {
             guide.display_rect = o.displayRect;
             guide.click_rect = o.clickRect;
             guide.finger = o.finger;
-            guide.lag_next = parseInt(o.lagNext);
+            guide.lag_next = parseFloat(o.lagNext);
             if (id != guide.id) {
                 this.data.set(id, arr);
                 arr = [];

+ 8 - 0
assets/script/game/data/module/PigBankData.ts

@@ -49,4 +49,12 @@ export class PigBankData extends Data {
         gData.cashNormal.getRecord();// 请求新的提现记录
 
     }
+
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        let bool = !!gData.gameData.gameData.isWithdrawable;
+        return bool;
+    }
 }

+ 7 - 0
assets/script/game/data/module/RedeemData.ts

@@ -52,4 +52,11 @@ export default class RedeemData extends Data {
 
         return response;
     }
+    
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        return false;
+    }
 }

+ 8 - 0
assets/script/game/data/module/SignData.ts

@@ -188,6 +188,14 @@ export class SignData extends Data {
         return index;
     }
 
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        let bool = !gData.gameData.gameData.isSignInToday && this.haveSignDay();
+        return bool;
+    }
+
 }
 
 export type CSignType = {

+ 7 - 0
assets/script/game/data/module/TurnableData.ts

@@ -48,4 +48,11 @@ export class TurnableData extends Data {
             }
         });
     }
+    
+    /**
+     * 红点功能
+     */
+    public redPoint(): boolean {
+        return false;
+    }
 }

+ 34 - 1
assets/script/game/game/Game.ts

@@ -5,6 +5,20 @@ import FunBtns from "./FunBtns";
 
 const { ccclass, property } = cc._decorator;
 
+@ccclass("RedPoinNode")
+export class RedPoinNode {
+    @property({ type: cc.Node, displayName: "签到" })
+    node_sign: cc.Node = null;
+    @property({ type: cc.Node, displayName: "存钱罐" })
+    node_pigbank: cc.Node = null;
+    @property({ type: cc.Node, displayName: "福袋" })
+    node_blessingBag: cc.Node = null;
+    @property({ type: cc.Node, displayName: "转盘" })
+    node_turnable: cc.Node = null;
+    @property({ type: cc.Node, displayName: "福利礼包" })
+    node_redeem: cc.Node = null;
+}
+
 @ccclass
 export default class Game extends cc.Component {
 
@@ -38,6 +52,8 @@ export default class Game extends cc.Component {
 
     @property({ type: cc.Node, displayName: "顶部ui组" })
     node_top_ui: cc.Node = null;
+    @property({ type: RedPoinNode, displayName: "红点组" })
+    nodeRedPoint: RedPoinNode = null;
 
 
     onLoad() {
@@ -88,6 +104,10 @@ export default class Game extends cc.Component {
         if (gData.gameData.init_head) {
             this.initHead();
         }
+
+        if (gData.gameData.init_red_point) {
+            this.initRedPoint();
+        }
     }
     lateUpdate() {
         gData.gameData.init_head = false;
@@ -143,6 +163,19 @@ 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_turnable.active = gData.turnable.redPoint();
+        this.nodeRedPoint.node_blessingBag.active = gData.blessingBag.redPoint();
+        this.nodeRedPoint.node_redeem.active = gData.redeem.redPoint();
+
+        gData.gameData.init_red_point = false;
+    }
+
+    /**
      * 自动打开面板
      * - isAutoOpenPanel 1自动开 2不自动开 其他不处理
      */
@@ -166,7 +199,7 @@ export default class Game extends cc.Component {
     }
 
     /** */
-    public onClickStart(a,b) {
+    public onClickStart(a, b) {
         this.node_gameplay.active = true;
     }
 

+ 8 - 5
assets/script/game/module/guide/Guide.ts

@@ -41,7 +41,6 @@ export default class Guide extends cc.Component {
     }
 
     start() {
-        return;
         if (gData.guideData.crtID == null) {
             this.node.destroy();
             return;
@@ -62,6 +61,7 @@ export default class Guide extends cc.Component {
             this.close();
         }
         else {
+            this.node_bg.opacity = 180;
             this.node_finger.opacity = 255;
             this.node_dialog.opacity = 255;
             this.targetNode = null;
@@ -160,6 +160,7 @@ export default class Guide extends cc.Component {
     }
 
     async clickNodeClick() {
+        mk.audio.playEffect("button");
         cc.Tween.stopAllByTarget(this.node_display);
         console.log("clickNodeClick");
         if (this.targetNode) {
@@ -167,7 +168,7 @@ export default class Guide extends cc.Component {
         }
         if (this.event_data) {
             //event_guide data:1_2 (1_2为新手引导的id)
-            mk.event.emit("event_guide",this.event_data);
+            mk.event.emit("event_guide", this.event_data);
         }
         this.reset();
         if (this.crtGuide.lag_next > 0) {
@@ -178,9 +179,11 @@ export default class Guide extends cc.Component {
 
     /** 等待状态 透明不可点击 */
     private reset() {
-        this.node_display.width = this.node.width;
-        this.node_display.height = this.node.height;
-        this.node_bg.x = this.node_bg.y = 0;
+        this.node_display.width = 0;
+        this.node_display.height = 0;
+        this.node_bg.x = -this.node_display.x;
+        this.node_bg.y = -this.node_display.y;
+        this.node_bg.opacity = 0;
         this.node_click.width = 0
         this.node_click.height = 0;
         this.node_finger.opacity = 0;

+ 1 - 0
assets/script/game/module/login/Login.ts

@@ -84,6 +84,7 @@ export default class Login extends cc.Component {
         gData.loginData.init();
         await this.checkForceUpate();
         await this.checkHotUpdate();
+        mk.audio.init();
     }
 
     //整包更新和新流程--------------------------------------------------------

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません