This commit is contained in:
computer\尼卡 2025-08-07 16:53:11 +08:00
parent 1b267ebc8e
commit 5cc6ea78a7
15 changed files with 5948 additions and 3806 deletions

View File

@ -79,6 +79,9 @@ export default class JiaZai extends cc.Component {
@property(cc.Node)
cardTime: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
private onShowListener: () => void;
private onHideListener: () => void;
// LIFE-CYCLE CALLBACKS:
onLoad() {
this.closeLoad();
@ -173,24 +176,29 @@ export default class JiaZai extends cc.Component {
//console.log("音乐开关", cc.fx.GameConfig.GM_INFO.musicOpen);
AudioManager._instance.playMusicGame();
// this.openMonthCard();
if (typeof wx !== 'undefined') {
wx.onShow(() => {
// 只有非首次启动时才调用 onGameShow
if (!this.isFirstLaunch) {
this.onGameShow();
this.onGames();
}
// 标记首次启动已完成
//监听后台
onGames() {
if (typeof wx !== 'undefined') {
this.onShowListener = null;
this.onHideListener = null;
// 定义监听函数
this.onShowListener = () => {
this.onGameShow();
});
wx.onHide(() => {
};
this.onHideListener = () => {
this.onGameHide();
this.isFirstLaunch = false;
});
};
wx.onShow(this.onShowListener);
wx.onHide(this.onHideListener);
}
}
onGameHide() {
console.log("执行onGameHide", cc.fx.GameConfig.GM_INFO.min_Time);
this.isFirstLaunch = false;
this.stopHeathTimeCutDown();
this.stopTimeCutDown();
this.stopPowerTime();
@ -205,7 +213,8 @@ export default class JiaZai extends cc.Component {
});
console.log("执行on", cc.fx.GameConfig.GM_INFO.min_Time);
if (this.node.getChildByName("heathpop") && this.node.getChildByName("heathpop").active == true) {
if (this.node.getChildByName("heathpop")) {
if (this.node.getChildByName("heathpop").active == true) {
const heathComponent = this.node.getChildByName("heathpop").getComponent("heathnum");
if (heathComponent && heathComponent.timeNode &&
cc.fx.GameConfig.GM_INFO.hp < cc.fx.GameConfig.GM_INFO.hp_Max) {
@ -213,6 +222,8 @@ export default class JiaZai extends cc.Component {
}
}
}
}
start() {
@ -491,6 +502,12 @@ export default class JiaZai extends cc.Component {
}, 500);
return;
}
if (typeof wx !== 'undefined') {
//@ts-ignore
wx.offShow(this.onShowListener);
wx.offHide(this.onHideListener);
}
if (this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl")._touch) {
this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl").setTouch(false);
let version = cc.fx.GameTool.getWechatGameVersion();
@ -550,6 +567,11 @@ export default class JiaZai extends cc.Component {
this.shopNode.active = true;
this.shopNode.getComponent("shop").init();
}
if (typeof wx !== 'undefined') {
//@ts-ignore
wx.offShow(this.onShowListener);
wx.offHide(this.onHideListener);
}
// //console.log("shopNode parent:", this.shopNode.parent);
}
@ -593,6 +615,11 @@ export default class JiaZai extends cc.Component {
this.monthlyCardNode.getComponent("monthlyCard").init();
this.monthlyCardNode.getComponent("monthlyCard").juwai = true;
}
if (typeof wx !== 'undefined') {
//@ts-ignore
wx.offShow(this.onShowListener);
wx.offHide(this.onHideListener);
}
}
// 关闭商店
@ -704,8 +731,8 @@ export default class JiaZai extends cc.Component {
console.log("需要补发数据", order);
if (order.itemid == "gold_1" || order.itemid == "gold_2" || order.itemid == "gold_3"
|| order.itemid == "gold_4" || order.itemid == "gold_5" || order.itemid == "gold_6"
|| order.itemid == "unlimited_health_bundle_1" || order.itemid == "unlimited_health_bundle_2"
|| order.itemid == "unlimited_health_bundle_3" || order.itemid == "month_Card" || "reborn_Gift"
|| order.itemid == "unlimited_health_bundle_10" || order.itemid == "unlimited_health_bundle_20"
|| order.itemid == "unlimited_health_bundle_30" || order.itemid == "month_Card" || "reborn_Gift"
) {
this.openLoad();
console.log("补发名称:", order.itemid);
@ -723,9 +750,9 @@ export default class JiaZai extends cc.Component {
else if (order.itemid == "gold_4") { coinTemp = 32000; }
else if (order.itemid == "gold_5") { coinTemp = 100000; }
else if (order.itemid == "gold_6") { coinTemp = 240000; }
else if (order.itemid == "unlimited_health_bundle_1") { coinTemp = 5000; }
else if (order.itemid == "unlimited_health_bundle_2") { coinTemp = 12000; }
else if (order.itemid == "unlimited_health_bundle_3") { coinTemp = 30000; }
else if (order.itemid == "unlimited_health_bundle_10") { coinTemp = 2500; }
else if (order.itemid == "unlimited_health_bundle_20") { coinTemp = 5000; }
else if (order.itemid == "unlimited_health_bundle_30") { coinTemp = 7500; }
else if (order.itemid == "month_Card") {
coinTemp = 6000;
cc.fx.GameConfig.GM_INFO.doubleCoin = 2;

View File

@ -1031,21 +1031,21 @@ var GameTool = {
{ type: "coin", count: coin },
]
break;
case "unlimited_health_bundle_1":
cc.fx.GameTool.changeCoin(5000);
coin = 5000;
price = 1800;
this.setUserPowerTime(1800);
case "unlimited_health_bundle_10":
cc.fx.GameTool.changeCoin(2500);
coin = 2500;
price = 1000;
this.setUserPowerTime(3600);
// MiniGameSdk.API.showToast("获得无限体力小组合包");
rewardData = [
{ type: "coin", count: coin },
{ type: "infinite_health", count: 1800 },
{ type: "infinite_health", count: 3600 },
]
break;
case "unlimited_health_bundle_2":
cc.fx.GameTool.changeCoin(12000);
coin = 12000;
price = 6600;
case "unlimited_health_bundle_20":
cc.fx.GameTool.changeCoin(5000);
coin = 5000;
price = 2000;
let propData = {
"freeze": 2,
"hammer": 2,
@ -1053,35 +1053,35 @@ var GameTool = {
"price": price
}
this.getShopProp(propData, compensate);
this.setUserPowerTime(3600);
this.setUserPowerTime(7200);
// MiniGameSdk.API.showToast("获得无限体力大组合包");
rewardData = [
{ type: "coin", count: coin },
{ type: "freeze", count: 2 },
{ type: "hammer", count: 2 },
{ type: "magic", count: 2 },
{ type: "infinite_health", count: 3600 },
{ type: "infinite_health", count: 7200 },
]
break;
case "unlimited_health_bundle_3":
cc.fx.GameTool.changeCoin(30000);
coin = 30000;
price = 10800;
case "unlimited_health_bundle_30":
cc.fx.GameTool.changeCoin(7500);
coin = 7500;
price = 3000;
let propData2 = {
"freeze": 6,
"hammer": 6,
"magic_wand": 6,
"freeze": 5,
"hammer": 5,
"magic_wand": 5,
"price": price
}
this.getShopProp(propData2, compensate);
this.setUserPowerTime(7200);
this.setUserPowerTime(14400);
// MiniGameSdk.API.showToast("获得无限体力超组合包");
rewardData = [
{ type: "coin", count: coin },
{ type: "freeze", count: 6 },
{ type: "hammer", count: 6 },
{ type: "magic", count: 6 },
{ type: "infinite_health", count: 7200 },
{ type: "freeze", count: 5 },
{ type: "hammer", count: 5 },
{ type: "magic", count: 5 },
{ type: "infinite_health", count: 14400 },
]
break;
case "month_Card":

View File

@ -285,6 +285,11 @@ export default class NewClass extends cc.Component {
jiazaiComp.rewarded();
console.log("123iiiii222")
}
if (jiazaiComp) {
jiazaiComp.onGames();
console.log("1222")
}
this.node.active = false;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -45,7 +45,7 @@
<key>spriteSourceSize</key>
<string>{130,38}</string>
<key>textureRect</key>
<string>{{292,0},{130,38}}</string>
<string>{{425,0},{130,38}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -60,7 +60,7 @@
<key>spriteSourceSize</key>
<string>{135,38}</string>
<key>textureRect</key>
<string>{{422,0},{135,38}}</string>
<string>{{555,0},{135,38}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -75,7 +75,22 @@
<key>spriteSourceSize</key>
<string>{162,38}</string>
<key>textureRect</key>
<string>{{557,0},{162,38}}</string>
<string>{{690,0},{162,38}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>4h.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{133,38}</string>
<key>spriteSourceSize</key>
<string>{133,38}</string>
<key>textureRect</key>
<string>{{292,0},{133,38}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -90,7 +105,7 @@
<key>spriteSourceSize</key>
<string>{1000,406}</string>
<key>textureRect</key>
<string>{{492,516},{1000,406}}</string>
<string>{{492,490},{1000,406}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -120,7 +135,7 @@
<key>spriteSourceSize</key>
<string>{464,132}</string>
<key>textureRect</key>
<string>{{1176,96},{464,132}}</string>
<string>{{1382,96},{464,132}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -135,7 +150,7 @@
<key>spriteSourceSize</key>
<string>{123,90}</string>
<key>textureRect</key>
<string>{{1385,0},{123,90}}</string>
<string>{{1563,0},{123,90}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -150,7 +165,7 @@
<key>spriteSourceSize</key>
<string>{322,96}</string>
<key>textureRect</key>
<string>{{1508,0},{322,96}}</string>
<string>{{1686,0},{322,96}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -165,7 +180,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{188,270},{246,246}}</string>
<string>{{342,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -180,7 +195,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{434,270},{246,246}}</string>
<string>{{588,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -195,7 +210,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{680,270},{246,246}}</string>
<string>{{834,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -210,7 +225,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{926,270},{246,246}}</string>
<string>{{1080,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -225,7 +240,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{1172,270},{246,246}}</string>
<string>{{1326,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -240,7 +255,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{1418,270},{246,246}}</string>
<string>{{1572,244},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -255,7 +270,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{0,516},{246,246}}</string>
<string>{{0,490},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -270,7 +285,7 @@
<key>spriteSourceSize</key>
<string>{246,246}</string>
<key>textureRect</key>
<string>{{246,516},{246,246}}</string>
<string>{{246,490},{246,246}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -285,7 +300,37 @@
<key>spriteSourceSize</key>
<string>{304,448}</string>
<key>textureRect</key>
<string>{{1492,516},{304,448}}</string>
<string>{{1492,490},{304,448}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>r_bq.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{148,148}</string>
<key>spriteSourceSize</key>
<string>{148,148}</string>
<key>textureRect</key>
<string>{{1846,96},{148,148}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>s_bq.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{206,122}</string>
<key>spriteSourceSize</key>
<string>{206,122}</string>
<key>textureRect</key>
<string>{{1176,96},{206,122}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -300,7 +345,7 @@
<key>spriteSourceSize</key>
<string>{286,42}</string>
<key>textureRect</key>
<string>{{800,0},{286,42}}</string>
<string>{{933,0},{286,42}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -315,7 +360,7 @@
<key>spriteSourceSize</key>
<string>{44,40}</string>
<key>textureRect</key>
<string>{{719,0},{44,40}}</string>
<string>{{852,0},{44,40}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -330,7 +375,7 @@
<key>spriteSourceSize</key>
<string>{188,207}</string>
<key>textureRect</key>
<string>{{0,270},{188,207}}</string>
<string>{{154,244},{188,207}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -360,7 +405,7 @@
<key>spriteSourceSize</key>
<string>{148,65}</string>
<key>textureRect</key>
<string>{{1086,0},{148,65}}</string>
<string>{{1264,0},{148,65}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -375,7 +420,7 @@
<key>spriteSourceSize</key>
<string>{151,65}</string>
<key>textureRect</key>
<string>{{1234,0},{151,65}}</string>
<string>{{1412,0},{151,65}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -405,7 +450,7 @@
<key>spriteSourceSize</key>
<string>{154,174}</string>
<key>textureRect</key>
<string>{{1640,96},{154,174}}</string>
<string>{{0,244},{154,174}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -420,7 +465,22 @@
<key>spriteSourceSize</key>
<string>{37,40}</string>
<key>textureRect</key>
<string>{{763,0},{37,40}}</string>
<string>{{896,0},{37,40}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>zhe.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{45,46}</string>
<key>spriteSourceSize</key>
<string>{45,46}</string>
<key>textureRect</key>
<string>{{1219,0},{45,46}}</string>
<key>textureRotated</key>
<false/>
</dict>
@ -436,9 +496,9 @@
<key>realTextureFileName</key>
<string>texture_atlas-1.png</string>
<key>size</key>
<string>{1830,964}</string>
<string>{2008,938}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:922b75cadd6e1a6365b192ddd2ada1b0:20640123229c1eef91916ad6809a7ed2:7574d8513b69ec3112d43152279b5c18$</string>
<string>$TexturePacker:SmartUpdate:451d50daa7daadaa9dd8412f5040c29d:21230410b68532ee0c6da2e54da431cb:7574d8513b69ec3112d43152279b5c18$</string>
<key>textureFileName</key>
<string>texture_atlas-1.png</string>
</dict>

View File

@ -4,8 +4,8 @@
"importer": "asset",
"rawTextureUuid": "6971355d-0542-42f6-96ec-4244dbcc5897",
"size": {
"width": 1830,
"height": 964
"width": 2008,
"height": 938
},
"type": "Texture Packer",
"subMetas": {
@ -65,7 +65,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 292,
"trimX": 425,
"trimY": 0,
"width": 130,
"height": 38,
@ -88,7 +88,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 422,
"trimX": 555,
"trimY": 0,
"width": 135,
"height": 38,
@ -111,7 +111,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 557,
"trimX": 690,
"trimY": 0,
"width": 162,
"height": 38,
@ -124,6 +124,29 @@
"spriteType": "normal",
"subMetas": {}
},
"4h.png": {
"ver": "1.0.6",
"uuid": "75fc2652-6239-434e-b00b-bd2406dcf50a",
"importer": "sprite-frame",
"rawTextureUuid": "6971355d-0542-42f6-96ec-4244dbcc5897",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 292,
"trimY": 0,
"width": 133,
"height": 38,
"rawWidth": 133,
"rawHeight": 38,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"banre.png": {
"ver": "1.0.6",
"uuid": "295fa69f-086d-4229-8dcd-446292dc31b0",
@ -135,7 +158,7 @@
"offsetX": 0,
"offsetY": 0,
"trimX": 492,
"trimY": 516,
"trimY": 490,
"width": 1000,
"height": 406,
"rawWidth": 1000,
@ -180,7 +203,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1176,
"trimX": 1382,
"trimY": 96,
"width": 464,
"height": 132,
@ -203,7 +226,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1385,
"trimX": 1563,
"trimY": 0,
"width": 123,
"height": 90,
@ -226,7 +249,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1508,
"trimX": 1686,
"trimY": 0,
"width": 322,
"height": 96,
@ -249,8 +272,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 188,
"trimY": 270,
"trimX": 342,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -272,8 +295,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 434,
"trimY": 270,
"trimX": 588,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -295,8 +318,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 680,
"trimY": 270,
"trimX": 834,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -318,8 +341,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 926,
"trimY": 270,
"trimX": 1080,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -341,8 +364,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1172,
"trimY": 270,
"trimX": 1326,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -364,8 +387,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1418,
"trimY": 270,
"trimX": 1572,
"trimY": 244,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -388,7 +411,7 @@
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 516,
"trimY": 490,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -411,7 +434,7 @@
"offsetX": 0,
"offsetY": 0,
"trimX": 246,
"trimY": 516,
"trimY": 490,
"width": 246,
"height": 246,
"rawWidth": 246,
@ -434,7 +457,7 @@
"offsetX": 0,
"offsetY": 0,
"trimX": 1492,
"trimY": 516,
"trimY": 490,
"width": 304,
"height": 448,
"rawWidth": 304,
@ -446,6 +469,52 @@
"spriteType": "normal",
"subMetas": {}
},
"r_bq.png": {
"ver": "1.0.6",
"uuid": "e314ab10-ab70-4ff7-8513-4254be9264ee",
"importer": "sprite-frame",
"rawTextureUuid": "6971355d-0542-42f6-96ec-4244dbcc5897",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1846,
"trimY": 96,
"width": 148,
"height": 148,
"rawWidth": 148,
"rawHeight": 148,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"s_bq.png": {
"ver": "1.0.6",
"uuid": "3d3ea606-2949-41b9-a98f-86f6f3122b0c",
"importer": "sprite-frame",
"rawTextureUuid": "6971355d-0542-42f6-96ec-4244dbcc5897",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1176,
"trimY": 96,
"width": 206,
"height": 122,
"rawWidth": 206,
"rawHeight": 122,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"shengxiaozhong.png": {
"ver": "1.0.6",
"uuid": "af474d63-41a4-4bdd-a7f1-5666c397332a",
@ -456,7 +525,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 800,
"trimX": 933,
"trimY": 0,
"width": 286,
"height": 42,
@ -479,7 +548,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 719,
"trimX": 852,
"trimY": 0,
"width": 44,
"height": 40,
@ -502,8 +571,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 270,
"trimX": 154,
"trimY": 244,
"width": 188,
"height": 207,
"rawWidth": 188,
@ -548,7 +617,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1086,
"trimX": 1264,
"trimY": 0,
"width": 148,
"height": 65,
@ -571,7 +640,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1234,
"trimX": 1412,
"trimY": 0,
"width": 151,
"height": 65,
@ -617,8 +686,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1640,
"trimY": 96,
"trimX": 0,
"trimY": 244,
"width": 154,
"height": 174,
"rawWidth": 154,
@ -640,7 +709,7 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 763,
"trimX": 896,
"trimY": 0,
"width": 37,
"height": 40,
@ -652,6 +721,29 @@
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
},
"zhe.png": {
"ver": "1.0.6",
"uuid": "bd09a391-0f09-4dd6-a17e-29e44be01ed3",
"importer": "sprite-frame",
"rawTextureUuid": "6971355d-0542-42f6-96ec-4244dbcc5897",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1219,
"trimY": 0,
"width": 45,
"height": 46,
"rawWidth": 45,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"spriteType": "normal",
"subMetas": {}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 154 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
import JiaZai from "../../Script/JiaZai";
import MapConroler from "../../Script/Map";
import Utils from "../../Script/module/Pay/Utils";
import List from "../../Script/module/RankList/List";
import NumberToImage from "../../Script/NumberToImage";
@ -179,6 +180,7 @@ export default class NewClass extends cc.Component {
const wincoin1 = winCOIN.getComponent(JiaZai);
if (wincoin1) {
if (wincoin1) {
wincoin1.onGames();
wincoin1.rewarded();
}
}
@ -234,9 +236,9 @@ export default class NewClass extends cc.Component {
console.log("_________正式发货", iosID);
MiniGameSdk.API.showToast("充值成功");
cc.fx.GameTool.shopBuy(iosID, false);
if (iosID == "unlimited_health_bundle_1" ||
iosID == "unlimited_health_bundle_2" ||
iosID == "unlimited_health_bundle_3"
if (iosID == "unlimited_health_bundle_10" ||
iosID == "unlimited_health_bundle_20" ||
iosID == "unlimited_health_bundle_30"
) {
this.updatePower();
}
@ -416,14 +418,14 @@ export default class NewClass extends cc.Component {
case "gold_6":
price = 64800;
break;
case "unlimited_health_bundle_1":
price = 1800;
case "unlimited_health_bundle_10":
price = 1000;
break;
case "unlimited_health_bundle_2":
price = 6600;
case "unlimited_health_bundle_20":
price = 2000;
break;
case "unlimited_health_bundle_3":
price = 10800;
case "unlimited_health_bundle_30":
price = 3000;
break;
case "month_Card":
price = 3000;
@ -466,9 +468,9 @@ export default class NewClass extends cc.Component {
// MiniGameSdk.API.showToast("充值成功");
// cc.fx.GameTool.shopBuy(productId, false);
// setTimeout(() => {
// if (productId == "unlimited_health_bundle_1" ||
// productId == "unlimited_health_bundle_2" ||
// productId == "unlimited_health_bundle_3"
// if (productId == "unlimited_health_bundle_10" ||
// productId == "unlimited_health_bundle_20" ||
// productId == "unlimited_health_bundle_30"
// ) {
// console.log("触发————————updatePower");
// this.updatePower();
@ -558,9 +560,9 @@ export default class NewClass extends cc.Component {
console.log("7.14_________正式发货");
MiniGameSdk.API.showToast("充值成功");
cc.fx.GameTool.shopBuy(productId, false);
if (productId == "unlimited_health_bundle_1" ||
productId == "unlimited_health_bundle_2" ||
productId == "unlimited_health_bundle_3"
if (productId == "unlimited_health_bundle_10" ||
productId == "unlimited_health_bundle_20" ||
productId == "unlimited_health_bundle_30"
) {
this.updatePower();
}
@ -615,6 +617,7 @@ export default class NewClass extends cc.Component {
//无限体力刷新功能
updatePower() {
console.log("无限体力时间戳:", cc.fx.GameConfig.GM_INFO.userPowerTime)
MapConroler._instance.setPropNum();
if (cc.fx.GameConfig.GM_INFO.userPowerTime != 0) {
let nowTime = Math.floor(Date.now() / 1000);
if (cc.fx.GameConfig.GM_INFO.userPowerTime > nowTime) {