Compare commits

...

3 Commits

Author SHA1 Message Date
YZ\249929363 7fa2297b81 修复BUG 2025-08-07 17:53:25 +08:00
YZ\249929363 9d8ad6307c 暂存 2025-08-07 16:59:47 +08:00
YZ\249929363 06e41bf83a 暂存 2025-08-07 16:55:07 +08:00
12 changed files with 505 additions and 241 deletions

View File

@ -7978,8 +7978,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 40, "width": 18,
"height": 56 "height": 48
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",

View File

@ -794,11 +794,9 @@ export default class JiaZai extends cc.Component {
} }
let name = "补发充值成功" + productId; let name = "补发充值成功" + productId;
cc.fx.GameTool.shushu_Track("payment", dataSuccess); cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "正式版") {
MiniGameSdk.API.yinli_Pay(price, order.outTradeNo, name);
}
console.log("引力付费透传", price, order.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, order.outTradeNo, name);
} else { } else {
// 如果当前订单不处理,直接处理下一个订单 // 如果当前订单不处理,直接处理下一个订单

View File

@ -11,7 +11,7 @@ import NumberToImage from "./NumberToImage";
import SceneManager from "./SceneManager"; import SceneManager from "./SceneManager";
import { MiniGameSdk } from "./Sdk/MiniGameSdk"; import { MiniGameSdk } from "./Sdk/MiniGameSdk";
import Animation = cc.Animation; import Animation = cc.Animation;
import Revive from "./Revive"; // import Revive from "./Revive";
import Utils from "./module/Pay/Utils"; import Utils from "./module/Pay/Utils";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ -664,19 +664,19 @@ export default class MapConroler extends cc.Component {
if (type == "wall") opacity = 255; if (type == "wall") opacity = 255;
if (type == "turn") opacity = 250; if (type == "turn") opacity = 250;
if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointB.x][pointB.y].opacity == 249) { if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointB.x][pointB.y].opacity == 249) {
console.log("缺角", pointA, pointB); //console.log("缺角", pointA, pointB);
return null; return null;
} }
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointC.x][pointC.y].opacity == 249) { else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointC.x][pointC.y].opacity == 249) {
console.log("缺角", pointA, pointC); //console.log("缺角", pointA, pointC);
return null; return null;
} }
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointD.x][pointD.y].opacity == 249) { else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointD.x][pointD.y].opacity == 249) {
console.log("缺角", pointA, pointD); //console.log("缺角", pointA, pointD);
return null; return null;
} }
else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointE.x][pointE.y].opacity == 249) { else if (this.mapBlocksWall[pointA.x][pointA.y].opacity == 249 && this.mapBlocksWall[pointE.x][pointE.y].opacity == 249) {
console.log("缺角", pointA, pointE); //console.log("缺角", pointA, pointE);
return null; return null;
} }
@ -1841,7 +1841,7 @@ export default class MapConroler extends cc.Component {
result: "fail" result: "fail"
} }
if (cc.fx.GameConfig.GM_INFO.revive == 0 && this.revive) { if (cc.fx.GameConfig.GM_INFO.revive == 0 && this.revive) {
this.revive.getComponent(Revive).offShow(); this.revive.getComponent("Revive").offShow();
this.node.active = false; this.node.active = false;
} }
cc.fx.GameTool.shushu_Track("finish_stage", data); cc.fx.GameTool.shushu_Track("finish_stage", data);
@ -1930,7 +1930,7 @@ export default class MapConroler extends cc.Component {
.to(0.15, { scale: 1.0 }, { easing: 'sineOut' }) .to(0.15, { scale: 1.0 }, { easing: 'sineOut' })
.start(); .start();
this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Time").active = true; this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Time").active = true;
this.revive.getComponent(Revive).init(); this.revive.getComponent("Revive").init();
this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Boom").active = false; this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Boom").active = false;
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) { if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
this.node.parent.parent.getChildByName("Lose").getChildByName("share").active = false; this.node.parent.parent.getChildByName("Lose").getChildByName("share").active = false;
@ -2065,9 +2065,9 @@ export default class MapConroler extends cc.Component {
//使用时间道具 //使用时间道具
useTimeProp() { useTimeProp() {
var pause = this.iceTrue();
console.log("冰冻状态:", pause);
if (this.node.parent.getChildByName("Ice").active == true || this.timeNumber <= 1 || this.gameOver || this.gameWin) { if (pause == true) {
return; return;
} }
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn"); let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
@ -2158,8 +2158,12 @@ export default class MapConroler extends cc.Component {
handleBuySuccess(data) { handleBuySuccess(data) {
this.node.parent.parent.parent.getComponent("SceneManager").resetBtn(); this.node.parent.parent.parent.getComponent("SceneManager").resetBtn();
this.updateCoin(); this.updateCoin();
var pause = this.iceTrue();
if (pause == false) {
this.pause = false; this.pause = false;
this.startBoom(); this.startBoom();
}
const timestamp = Date.now(); const timestamp = Date.now();
// console.log("回调函数内:",this.pause); // console.log("回调函数内:",this.pause);
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn"); let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
@ -3274,6 +3278,15 @@ export default class MapConroler extends cc.Component {
} }
} }
iceTrue() {
if (this.node.parent.getChildByName("Ice").active == true || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
return true;
}
else {
return false;
}
}
update(dt) { update(dt) {

View File

@ -59,6 +59,7 @@ export default class Revive extends cc.Component {
} }
cc.fx.GameTool.shushu_Track("payment", dataSuccess); cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + iosID; let name = "购买金币道具:" + iosID;
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name) MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
Utils.setPayInfo( Utils.setPayInfo(
(res) => { (res) => {
@ -135,8 +136,15 @@ export default class Revive extends cc.Component {
} }
} }
init() { init() {
this.addListener();
this.btn_Touch = true;
if (cc.fx.GameConfig.GM_INFO.revive == 1) {
this.node.active = false;
}
}
addListener() {
if (cc.sys.platform === cc.sys.WECHAT_GAME) { if (cc.sys.platform === cc.sys.WECHAT_GAME) {
this.onShowListener = null;
// 定义监听函数 // 定义监听函数
this.onShowListener = () => { this.onShowListener = () => {
this.onShow(); this.onShow();
@ -144,10 +152,6 @@ export default class Revive extends cc.Component {
//@ts-ignore //@ts-ignore
wx.onShow(this.onShowListener); wx.onShow(this.onShowListener);
} }
this.btn_Touch = true;
if (cc.fx.GameConfig.GM_INFO.revive == 1) {
this.node.active = false;
}
} }
//购买 //购买
@ -315,6 +319,7 @@ export default class Revive extends cc.Component {
} }
cc.fx.GameTool.shushu_Track("payment", dataSuccess); cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + productId; let name = "购买金币道具:" + productId;
console.log("引力付费透传", price, Utils.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name) MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
console.log("7.14_______________充值成功,轮训成功,准备发货"); console.log("7.14_______________充值成功,轮训成功,准备发货");
Utils.setPayInfo( Utils.setPayInfo(

View File

@ -315,7 +315,8 @@ export default class SceneManager extends cc.Component {
cc.fx.AudioManager._instance.playEffect("anniu_little", null); cc.fx.AudioManager._instance.playEffect("anniu_little", null);
this.pause.getComponent("btnControl").setTouch(true); this.pause.getComponent("btnControl").setTouch(true);
this.node.getChildByName("Pause").active = false; this.node.getChildByName("Pause").active = false;
if (MapConroler._instance.node.parent.getChildByName("Ice").active == false) { var pause = MapConroler._instance.iceTrue();
if (pause == false) {
MapConroler._instance.pause = false; MapConroler._instance.pause = false;
MapConroler._instance.startBoom(); MapConroler._instance.startBoom();
} }
@ -418,8 +419,12 @@ export default class SceneManager extends cc.Component {
closePropBuy() { closePropBuy() {
var pause = MapConroler._instance.iceTrue();
if (pause == false) {
MapConroler._instance.pause = false; MapConroler._instance.pause = false;
MapConroler._instance.startBoom(); MapConroler._instance.startBoom();
}
let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn"); let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn"); let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn"); let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn");

View File

@ -1192,7 +1192,7 @@ export namespace MiniGameSdk {
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值 current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币 tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号 version: cc.fx.GameConfig.GM_INFO.version.toString(),//当前版本号
uid: cc.fx.GameConfig.GM_INFO.uid.toString() //用户id user_id: cc.fx.GameConfig.GM_INFO.uid.toString() //用户id
}; };
if (register_time != null) { if (register_time != null) {
// console.log("设置用户公共属性注册:————————————", register_time); // console.log("设置用户公共属性注册:————————————", register_time);
@ -1202,7 +1202,7 @@ export namespace MiniGameSdk {
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币 tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(), version: cc.fx.GameConfig.GM_INFO.version.toString(),
register_time: register_time, register_time: register_time,
uid: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
pay_user: pay_user pay_user: pay_user
}; };
} }
@ -1213,7 +1213,7 @@ export namespace MiniGameSdk {
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值 current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币 tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
version: cc.fx.GameConfig.GM_INFO.version.toString(), version: cc.fx.GameConfig.GM_INFO.version.toString(),
uid: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id user_id: cc.fx.GameConfig.GM_INFO.uid.toString(), //用户id
pay_user: pay_user pay_user: pay_user
} }
} }
@ -1337,8 +1337,15 @@ export namespace MiniGameSdk {
*/ */
static yinli_Pay(payAmount, orderId, payReason) { static yinli_Pay(payAmount, orderId, payReason) {
if (typeof wx !== 'undefined' && wx !== null) { if (typeof wx !== 'undefined' && wx !== null) {
let version = cc.fx.GameTool.getWechatGameVersion();
if (version == "开发版" || version == "体验版") {
}
else {
API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信"); API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信");
} }
console.log("版本:", version);
}
} }
static yinli_Login() { static yinli_Login() {

View File

@ -41,6 +41,7 @@ export default class NewClass extends cc.Component {
} }
onShow() { onShow() {
console.log("后台进入前台monthlcard");
if (cc.sys.platform === cc.sys.WECHAT_GAME) { if (cc.sys.platform === cc.sys.WECHAT_GAME) {
console.log("从后台进入前台订单号:", cc.fx.GameConfig.GM_INFO.iosOutTradeNo); console.log("从后台进入前台订单号:", cc.fx.GameConfig.GM_INFO.iosOutTradeNo);
if (cc.fx.GameConfig.GM_INFO.iosOutTradeNo != null && cc.fx.GameConfig.GM_INFO.iosOutTradeNo != "") { if (cc.fx.GameConfig.GM_INFO.iosOutTradeNo != null && cc.fx.GameConfig.GM_INFO.iosOutTradeNo != "") {
@ -66,6 +67,7 @@ export default class NewClass extends cc.Component {
} }
cc.fx.GameTool.shushu_Track("payment", dataSuccess); cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + iosID; let name = "购买金币道具:" + iosID;
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name) MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
Utils.setPayInfo( Utils.setPayInfo(
(res) => { (res) => {
@ -152,9 +154,9 @@ export default class NewClass extends cc.Component {
} }
init() { init() {
if (cc.sys.platform === cc.sys.WECHAT_GAME) { if (cc.sys.platform === cc.sys.WECHAT_GAME) {
this.onShowListener = null;
// 定义监听函数 // 定义监听函数
this.onShowListener = () => { this.onShowListener = () => {
console.log("微信小游戏切到前台,monthCard");
this.onShow(); this.onShow();
}; };
//@ts-ignore //@ts-ignore
@ -261,7 +263,7 @@ export default class NewClass extends cc.Component {
// update (dt) {} // update (dt) {}
} }
closeMonthCard() { closeMonthCard() {
this.init(); // this.init();
//获取商城界面更新图标方法 //获取商城界面更新图标方法
let shop = cc.find("Canvas/shop"); let shop = cc.find("Canvas/shop");
if (shop) { if (shop) {
@ -273,8 +275,10 @@ export default class NewClass extends cc.Component {
// 移除 wx.onShow 监听器 // 移除 wx.onShow 监听器
if (cc.sys.platform === cc.sys.WECHAT_GAME && this.onShowListener) { if (cc.sys.platform === cc.sys.WECHAT_GAME && this.onShowListener) {
console.log("月卡关闭监听");
//@ts-ignore //@ts-ignore
wx.offShow(this.onShowListener); wx.offShow(this.onShowListener);
} }
//jiazai //jiazai
const jiazaiNode = cc.find("Canvas"); // 假设 JiaZai 挂在 Canvas 节点 const jiazaiNode = cc.find("Canvas"); // 假设 JiaZai 挂在 Canvas 节点
@ -421,6 +425,7 @@ export default class NewClass extends cc.Component {
} }
cc.fx.GameTool.shushu_Track("payment", dataSuccess); cc.fx.GameTool.shushu_Track("payment", dataSuccess);
let name = "购买金币道具:" + productId; let name = "购买金币道具:" + productId;
console.log("引力付费透传", price, Utils.outTradeNo, name);
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name) MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
console.log("7.14_______________充值成功,轮训成功,准备发货"); console.log("7.14_______________充值成功,轮训成功,准备发货");
Utils.setPayInfo( Utils.setPayInfo(

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 503, "width": 256,
"height": 1104, "height": 2040,
"platformSettings": {}, "platformSettings": {},
"subMetas": {} "subMetas": {}
} }

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1966, "width": 2008,
"height": 922, "height": 938,
"platformSettings": {}, "platformSettings": {},
"subMetas": {} "subMetas": {}
} }

View File

@ -635,8 +635,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 47, "width": 25,
"height": 63 "height": 53
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -745,7 +745,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 47, "width": 47,
"height": 63 "height": 51
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -854,7 +854,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 47, "width": 47,
"height": 63 "height": 51
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -963,7 +963,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 47, "width": 47,
"height": 63 "height": 51
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -1270,7 +1270,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 33, "width": 25,
"height": 37 "height": 37
}, },
"_anchorPoint": { "_anchorPoint": {
@ -1488,7 +1488,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 33, "width": 25,
"height": 37 "height": 37
}, },
"_anchorPoint": { "_anchorPoint": {
@ -1706,7 +1706,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 33, "width": 25,
"height": 37 "height": 37
}, },
"_anchorPoint": { "_anchorPoint": {
@ -1893,8 +1893,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 40, "width": 38,
"height": 46 "height": 44
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -2003,7 +2003,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 40, "width": 40,
"height": 46 "height": 44
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,10 @@ export default class NewClass extends cc.Component {
} }
init() { init() {
let flag = cc.fx.GameTool.getSetScreenResolutionFlag();
if (flag) {
this.node.getChildByName("itemcontent").getChildByName("view").height = 1500;
}
this.onShowListener = null; this.onShowListener = null;
if (cc.sys.platform === cc.sys.WECHAT_GAME) { if (cc.sys.platform === cc.sys.WECHAT_GAME) {
// 定义监听函数 // 定义监听函数
@ -616,8 +620,15 @@ export default class NewClass extends cc.Component {
//无限体力刷新功能 //无限体力刷新功能
updatePower() { updatePower() {
console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime) console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime);
const winCOIN = cc.find("Canvas"); // 假设 Canvas 节点
if (winCOIN) {
const wincoin = winCOIN.getComponent(SceneManager);
if (wincoin) {
MapConroler._instance.setPropNum(); MapConroler._instance.setPropNum();
console.log("局内");
};
}
if (cc.fx.GameConfig.GM_INFO.userPowerTime != 0) { if (cc.fx.GameConfig.GM_INFO.userPowerTime != 0) {
let nowTime = Math.floor(Date.now() / 1000); let nowTime = Math.floor(Date.now() / 1000);
if (cc.fx.GameConfig.GM_INFO.userPowerTime > nowTime) { if (cc.fx.GameConfig.GM_INFO.userPowerTime > nowTime) {