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

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

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

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

@@ -70,7 +70,7 @@ export default class Game extends cc.Component {
         this.autoOpenPanel();
         this.autoOpenPanel();
         this.runGuideWeak();
         this.runGuideWeak();
 
 
-        // mk.guide.open(1);
+        mk.guide.open(1);
         // // 测试代码
         // // 测试代码
         // this.schedule(() => {
         // this.schedule(() => {
 
 
@@ -175,6 +175,10 @@ export default class Game extends cc.Component {
         this.nodeRedPoint.node_redeem.active = gData.redeem.redPoint();
         this.nodeRedPoint.node_redeem.active = gData.redeem.redPoint();
 
 
         gData.gameData.init_red_point = false;
         gData.gameData.init_red_point = false;
+
+        if(this.nodeRedPoint.node_redbagCash.active){
+            mk.guide.open(2); 
+        }
     }
     }
 
 
     /**
     /**

+ 2 - 2
assets/script/game/module/guide/Guide.ts

@@ -124,7 +124,7 @@ export default class Guide extends cc.Component {
                     this.node_display.height = this.node.height;
                     this.node_display.height = this.node.height;
                     //动画
                     //动画
                     cc.tween(this.node_display)
                     cc.tween(this.node_display)
-                        .to(0.3, { x: x, y: y, width: w, height: h }, {
+                        .to(0.1, { x: x, y: y, width: w, height: h }, {
                             onUpdate: () => {
                             onUpdate: () => {
                                 this.node_bg.x = -this.node_display.x;
                                 this.node_bg.x = -this.node_display.x;
                                 this.node_bg.y = -this.node_display.y;
                                 this.node_bg.y = -this.node_display.y;
@@ -140,7 +140,7 @@ export default class Guide extends cc.Component {
                     //动画
                     //动画
                     let radius = this.crtGuide.display_type;
                     let radius = this.crtGuide.display_type;
                     cc.tween(this.node_display)
                     cc.tween(this.node_display)
-                        .to(0.3, { width: radius, height: radius })
+                        .to(0.1, { width: radius, height: radius })
                         .start();
                         .start();
                 }
                 }
             }
             }

+ 13 - 0
assets/script/game/module/redBagCash/RedBagCashItem.ts

@@ -34,9 +34,18 @@ export default class RedBagCashItem extends cc.Component {
      * 初始化数据
      * 初始化数据
      */
      */
     public async setItemData(item_data) {
     public async setItemData(item_data) {
+        if(this.item_data == null && item_data.index == 1){
+            mk.event.register("event_guide", this.clickGuide.bind, this);
+        }
         await this.initStyle(item_data);
         await this.initStyle(item_data);
     }
     }
 
 
+    private clickGuide(data: string) {
+        if (data == "2_2") {
+            this.clickCashOP();
+        }
+    }
+
     /**
     /**
      * 初始化样式
      * 初始化样式
      * @param item_data 条目数据 
      * @param item_data 条目数据 
@@ -80,4 +89,8 @@ export default class RedBagCashItem extends cc.Component {
         gData.redBagCash.cashOP();
         gData.redBagCash.cashOP();
     }
     }
 
 
+    onDestroy(){
+        mk.event.remove("event_guide",this.clickGuide,this);
+    }
+
 }
 }

+ 3 - 2
assets/script/mk/system/GuideSystem.ts

@@ -11,17 +11,18 @@ export default class GuideSystem {
     public ui:cc.Node;
     public ui:cc.Node;
 
 
     public open(id) {
     public open(id) {
+        return;
         this.crtGuideID = gData.gameData.getProp(GameProp.guideID);
         this.crtGuideID = gData.gameData.getProp(GameProp.guideID);
         //测试永远新手引导,永远第一关
         //测试永远新手引导,永远第一关
         if (!cc.sys.isNative) {
         if (!cc.sys.isNative) {
-            this.crtGuideID = 0;
+            this.crtGuideID = 1;
             gData.gameData.setProp(GameProp.levelNum, 0);
             gData.gameData.setProp(GameProp.levelNum, 0);
         }
         }
         if (this.crtGuideID >= 9999) {
         if (this.crtGuideID >= 9999) {
             mk.console.log("新手引导已做完");
             mk.console.log("新手引导已做完");
             return;
             return;
         }
         }
-        if (id >= this.crtGuideID && this.crtGuideID > 0) {
+        if (id <= this.crtGuideID && this.crtGuideID > 0) {
             mk.console.log("当前引导已做过:" + id);
             mk.console.log("当前引导已做过:" + id);
             return;
             return;
         }
         }