Compare commits
3 Commits
5cc6ea78a7
...
7fa2297b81
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7fa2297b81 | ||
![]() |
9d8ad6307c | ||
![]() |
06e41bf83a |
|
@ -7978,8 +7978,8 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 56
|
||||
"width": 18,
|
||||
"height": 48
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
|
|
@ -794,11 +794,9 @@ export default class JiaZai extends cc.Component {
|
|||
}
|
||||
let name = "补发充值成功" + productId;
|
||||
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 {
|
||||
// 如果当前订单不处理,直接处理下一个订单
|
||||
|
|
|
@ -11,7 +11,7 @@ import NumberToImage from "./NumberToImage";
|
|||
import SceneManager from "./SceneManager";
|
||||
import { MiniGameSdk } from "./Sdk/MiniGameSdk";
|
||||
import Animation = cc.Animation;
|
||||
import Revive from "./Revive";
|
||||
// import Revive from "./Revive";
|
||||
import Utils from "./module/Pay/Utils";
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
|
@ -664,19 +664,19 @@ export default class MapConroler extends cc.Component {
|
|||
if (type == "wall") opacity = 255;
|
||||
if (type == "turn") opacity = 250;
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1841,7 +1841,7 @@ export default class MapConroler extends cc.Component {
|
|||
result: "fail"
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.revive == 0 && this.revive) {
|
||||
this.revive.getComponent(Revive).offShow();
|
||||
this.revive.getComponent("Revive").offShow();
|
||||
this.node.active = false;
|
||||
}
|
||||
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' })
|
||||
.start();
|
||||
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;
|
||||
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
|
||||
this.node.parent.parent.getChildByName("Lose").getChildByName("share").active = false;
|
||||
|
@ -2065,9 +2065,9 @@ export default class MapConroler extends cc.Component {
|
|||
|
||||
//使用时间道具
|
||||
useTimeProp() {
|
||||
|
||||
|
||||
if (this.node.parent.getChildByName("Ice").active == true || this.timeNumber <= 1 || this.gameOver || this.gameWin) {
|
||||
var pause = this.iceTrue();
|
||||
console.log("冰冻状态:", pause);
|
||||
if (pause == true) {
|
||||
return;
|
||||
}
|
||||
let freezeBtn = this.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||
|
@ -2158,8 +2158,12 @@ export default class MapConroler extends cc.Component {
|
|||
handleBuySuccess(data) {
|
||||
this.node.parent.parent.parent.getComponent("SceneManager").resetBtn();
|
||||
this.updateCoin();
|
||||
this.pause = false;
|
||||
this.startBoom();
|
||||
var pause = this.iceTrue();
|
||||
if (pause == false) {
|
||||
this.pause = false;
|
||||
this.startBoom();
|
||||
}
|
||||
|
||||
const timestamp = Date.now();
|
||||
// console.log("回调函数内:",this.pause);
|
||||
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) {
|
||||
|
|
|
@ -59,6 +59,7 @@ export default class Revive extends cc.Component {
|
|||
}
|
||||
cc.fx.GameTool.shushu_Track("payment", dataSuccess);
|
||||
let name = "购买金币道具:" + iosID;
|
||||
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
|
||||
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
|
||||
Utils.setPayInfo(
|
||||
(res) => {
|
||||
|
@ -135,8 +136,15 @@ export default class Revive extends cc.Component {
|
|||
}
|
||||
}
|
||||
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) {
|
||||
this.onShowListener = null;
|
||||
// 定义监听函数
|
||||
this.onShowListener = () => {
|
||||
this.onShow();
|
||||
|
@ -144,10 +152,6 @@ export default class Revive extends cc.Component {
|
|||
//@ts-ignore
|
||||
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);
|
||||
let name = "购买金币道具:" + productId;
|
||||
console.log("引力付费透传", price, Utils.outTradeNo, name);
|
||||
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
|
||||
console.log("7.14_______________充值成功,轮训成功,准备发货");
|
||||
Utils.setPayInfo(
|
||||
|
|
|
@ -315,7 +315,8 @@ export default class SceneManager extends cc.Component {
|
|||
cc.fx.AudioManager._instance.playEffect("anniu_little", null);
|
||||
this.pause.getComponent("btnControl").setTouch(true);
|
||||
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.startBoom();
|
||||
}
|
||||
|
@ -418,8 +419,12 @@ export default class SceneManager extends cc.Component {
|
|||
|
||||
|
||||
closePropBuy() {
|
||||
MapConroler._instance.pause = false;
|
||||
MapConroler._instance.startBoom();
|
||||
var pause = MapConroler._instance.iceTrue();
|
||||
if (pause == false) {
|
||||
MapConroler._instance.pause = false;
|
||||
MapConroler._instance.startBoom();
|
||||
}
|
||||
|
||||
let freezeBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("timeBtn");
|
||||
let hammerBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("destroyBtn");
|
||||
let magicBtn = MapConroler._instance.node.parent.getChildByName("Bottom").getChildByName("magicBtn");
|
||||
|
|
|
@ -1192,7 +1192,7 @@ export namespace MiniGameSdk {
|
|||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||
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) {
|
||||
// console.log("设置用户公共属性注册:————————————", register_time);
|
||||
|
@ -1202,7 +1202,7 @@ export namespace MiniGameSdk {
|
|||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||
version: cc.fx.GameConfig.GM_INFO.version.toString(),
|
||||
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
|
||||
};
|
||||
}
|
||||
|
@ -1213,7 +1213,7 @@ export namespace MiniGameSdk {
|
|||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -1337,7 +1337,14 @@ export namespace MiniGameSdk {
|
|||
*/
|
||||
static yinli_Pay(payAmount, orderId, payReason) {
|
||||
if (typeof wx !== 'undefined' && wx !== null) {
|
||||
API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信");
|
||||
let version = cc.fx.GameTool.getWechatGameVersion();
|
||||
if (version == "开发版" || version == "体验版") {
|
||||
}
|
||||
else {
|
||||
API._ge.payEvent(payAmount, "CNY", orderId, payReason, "微信");
|
||||
}
|
||||
console.log("版本:", version);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
|
||||
onShow() {
|
||||
console.log("后台进入前台,monthlcard");
|
||||
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
||||
console.log("从后台进入前台订单号:", 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);
|
||||
let name = "购买金币道具:" + iosID;
|
||||
console.log("引力付费透传", iosAmount, iosOutTradeNo, name);
|
||||
MiniGameSdk.API.yinli_Pay(iosAmount, iosOutTradeNo, name)
|
||||
Utils.setPayInfo(
|
||||
(res) => {
|
||||
|
@ -152,9 +154,9 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
init() {
|
||||
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
||||
this.onShowListener = null;
|
||||
// 定义监听函数
|
||||
this.onShowListener = () => {
|
||||
console.log("微信小游戏切到前台,monthCard");
|
||||
this.onShow();
|
||||
};
|
||||
//@ts-ignore
|
||||
|
@ -261,7 +263,7 @@ export default class NewClass extends cc.Component {
|
|||
// update (dt) {}
|
||||
}
|
||||
closeMonthCard() {
|
||||
this.init();
|
||||
// this.init();
|
||||
//获取商城界面更新图标方法
|
||||
let shop = cc.find("Canvas/shop");
|
||||
if (shop) {
|
||||
|
@ -273,8 +275,10 @@ export default class NewClass extends cc.Component {
|
|||
|
||||
// 移除 wx.onShow 监听器
|
||||
if (cc.sys.platform === cc.sys.WECHAT_GAME && this.onShowListener) {
|
||||
console.log("月卡关闭监听");
|
||||
//@ts-ignore
|
||||
wx.offShow(this.onShowListener);
|
||||
|
||||
}
|
||||
//jiazai
|
||||
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);
|
||||
let name = "购买金币道具:" + productId;
|
||||
console.log("引力付费透传", price, Utils.outTradeNo, name);
|
||||
MiniGameSdk.API.yinli_Pay(price, Utils.outTradeNo, name)
|
||||
console.log("7.14_______________充值成功,轮训成功,准备发货");
|
||||
Utils.setPayInfo(
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 503,
|
||||
"height": 1104,
|
||||
"width": 256,
|
||||
"height": 2040,
|
||||
"platformSettings": {},
|
||||
"subMetas": {}
|
||||
}
|
|
@ -8,8 +8,8 @@
|
|||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 1966,
|
||||
"height": 922,
|
||||
"width": 2008,
|
||||
"height": 938,
|
||||
"platformSettings": {},
|
||||
"subMetas": {}
|
||||
}
|
|
@ -635,8 +635,8 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 47,
|
||||
"height": 63
|
||||
"width": 25,
|
||||
"height": 53
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -745,7 +745,7 @@
|
|||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 47,
|
||||
"height": 63
|
||||
"height": 51
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -854,7 +854,7 @@
|
|||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 47,
|
||||
"height": 63
|
||||
"height": 51
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -963,7 +963,7 @@
|
|||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 47,
|
||||
"height": 63
|
||||
"height": 51
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -1270,7 +1270,7 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 33,
|
||||
"width": 25,
|
||||
"height": 37
|
||||
},
|
||||
"_anchorPoint": {
|
||||
|
@ -1488,7 +1488,7 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 33,
|
||||
"width": 25,
|
||||
"height": 37
|
||||
},
|
||||
"_anchorPoint": {
|
||||
|
@ -1706,7 +1706,7 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 33,
|
||||
"width": 25,
|
||||
"height": 37
|
||||
},
|
||||
"_anchorPoint": {
|
||||
|
@ -1893,8 +1893,8 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 46
|
||||
"width": 38,
|
||||
"height": 44
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
@ -2003,7 +2003,7 @@
|
|||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 40,
|
||||
"height": 46
|
||||
"height": 44
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -62,6 +62,10 @@ export default class NewClass extends cc.Component {
|
|||
}
|
||||
|
||||
init() {
|
||||
let flag = cc.fx.GameTool.getSetScreenResolutionFlag();
|
||||
if (flag) {
|
||||
this.node.getChildByName("itemcontent").getChildByName("view").height = 1500;
|
||||
}
|
||||
this.onShowListener = null;
|
||||
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
|
||||
// 定义监听函数
|
||||
|
@ -616,8 +620,15 @@ export default class NewClass extends cc.Component {
|
|||
|
||||
//无限体力刷新功能
|
||||
updatePower() {
|
||||
console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime)
|
||||
MapConroler._instance.setPropNum();
|
||||
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();
|
||||
console.log("局内");
|
||||
};
|
||||
}
|
||||
if (cc.fx.GameConfig.GM_INFO.userPowerTime != 0) {
|
||||
let nowTime = Math.floor(Date.now() / 1000);
|
||||
if (cc.fx.GameConfig.GM_INFO.userPowerTime > nowTime) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user