From 919f13353811849f1401f040e9f11afc92065d8a Mon Sep 17 00:00:00 2001 From: "YZ\\249929363" <249929363@qq.com> Date: Tue, 8 Jul 2025 11:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E7=82=B9=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=87=91=E5=B8=81=E8=8E=B7?= =?UTF-8?q?=E5=BE=97=E6=8F=90=E7=A4=BA=EF=BC=8C=E6=9B=B4=E6=94=B9=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=96=B9=E5=9D=97=E9=AB=98=E4=BA=AE=E7=B2=BE=E7=A1=AE?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/Block.ts | 84 ++++++++++++++++++++++++--- assets/Script/module/Tool/GameTool.ts | 14 ++++- 2 files changed, 88 insertions(+), 10 deletions(-) diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 24c99c0..5fa9aee 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -248,10 +248,10 @@ export default class Block extends cc.Component { let name = "xz_"+this.block_Info.block; this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name]; this.hit.setAnchorPoint(this.node.anchorX,this.node.anchorY); - this.hit.setPosition(13,-11); - if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11); - else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11); - else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9); + this.setHitPosition(); + // if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11); + // else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11); + // else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9); // this.hit.opacity = 0; this.hit.active = false; break; @@ -877,10 +877,10 @@ export default class Block extends cc.Component { let name = "xz_"+this.block_Info.block; this.hit.getComponent(cc.Sprite).spriteFrame = this.ice_SpriteFrame._spriteFrames[name]; this.hit.setAnchorPoint(this.node.anchorX,this.node.anchorY); - this.hit.setPosition(13,-11); - if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11); - else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11); - else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9); + this.setHitPosition(); + // if(this.hit.anchorX == 0.5) this.hit.setPosition(0,-11); + // else if(this.hit.anchorX == 0.33) this.hit.setPosition(-13,-11); + // else if(this.hit.anchorX == 0.66) this.hit.setPosition(2,-9); this.hit.active = false; } @@ -1288,7 +1288,73 @@ export default class Block extends cc.Component { } } } - + } + + //精细更改 点击高亮位置 + setHitPosition(){ + this.hit.setPosition(13,-16); + switch(this.block_Info.block){ + case 0: + this.hit.setPosition(15,-20); + break; + case 1: + this.hit.setPosition(13,-17.5); + break; + case 2: + this.hit.setPosition(15,-16); + break; + case 4: + this.hit.setPosition(12,-18); + break; + case 6: + this.hit.setPosition(15,-14); + break; + case 7: + this.hit.setPosition(17,-9); + break; + case 8: + this.hit.setPosition(15,-14); + break; + case 9: + this.hit.setPosition(13,-13); + break; + case 10: + this.hit.setPosition(-5.5,-14); + break; + case 11: + this.hit.setPosition(-6,-15); + break; + case 12: + this.hit.setPosition(15,-15); + break; + case 13: + this.hit.setPosition(15,-13); + break; + case 13: + this.hit.setPosition(15,-14); + break; + case 14: + this.hit.setPosition(2,-7); + break; + case 15: + this.hit.setPosition(15,-16); + break; + case 16: + this.hit.setPosition(1,-15.5); + break; + case 17: + this.hit.setPosition(15,-14); + break; + case 18: + this.hit.setPosition(5,-13); + break; + case 21: + this.hit.setPosition(-2,-14); + break; + case 22: + this.hit.setPosition(14,-14); + break; + } } } diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 8d8cec3..c99db5e 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -372,7 +372,14 @@ var GameTool = { return; } cc.fx.GameConfig.GM_INFO.coin += coin; - + if(coin > 0){ + let data = "获得" + (coin) + "金币"; + MiniGameSdk.API.showToast(data); + } + else{ + let data = "消耗" + (-coin) + "金币"; + MiniGameSdk.API.showToast(data); + } if (cc.fx.GameConfig.GM_INFO.coin < 0) { cc.fx.GameConfig.GM_INFO.coin = 0; } @@ -887,6 +894,11 @@ var GameTool = { shushu_Track: function(name,data){ let eventData = {} switch(name){ + case "login": + eventData = { + register_time: data.register_time, + } + break; case "register": eventData = { register_time: data.register_time,