From f1be959ea90e09c7bd66f37aada66d6a9a1590ce Mon Sep 17 00:00:00 2001 From: "COMPUTER\\EDY" <249929363@qq.com> Date: Tue, 13 Jan 2026 17:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Script/JiaZai.ts | 6 + assets/Script/Map.ts | 37 +-- assets/Script/SceneManager.ts | 2 +- assets/Script/module/Tool/GameTool.ts | 2 +- assets/Script/module/Tool/array.js | 49 ++++ assets/Script/module/Tool/array.js.meta | 10 + assets/Script/setUi.ts | 6 +- assets/custom/Json/level956.json | 317 ++++++++++++++++++++++++ assets/custom/Json/level956.json.meta | 6 + 9 files changed, 417 insertions(+), 18 deletions(-) create mode 100644 assets/Script/module/Tool/array.js create mode 100644 assets/Script/module/Tool/array.js.meta create mode 100644 assets/custom/Json/level956.json create mode 100644 assets/custom/Json/level956.json.meta diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index c9d820e..3e4ccea 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -950,6 +950,9 @@ export default class JiaZai extends cc.Component { } startGame() { + if (cc.fx.GameConfig.GM_INFO.otherLevel == 0) { + cc.fx.GameConfig.GM_INFO.allOutTradeNo = []; + } cc.fx.AudioManager._instance.playEffect("anniu_Big", null); let version = cc.fx.GameTool.getWechatGameVersion(); if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.otherLevel == 0) { @@ -1368,6 +1371,9 @@ export default class JiaZai extends cc.Component { // 递归函数,按顺序处理每个订单 const processOrder = (index: number) => { if (index >= cc.fx.GameConfig.GM_INFO.allOutTradeNo.length) { + // 所有订单处理完成,清空数组 + cc.fx.GameConfig.GM_INFO.allOutTradeNo = []; + console.log("补发逻辑全部完成,已清空allOutTradeNo数组"); return; // 所有订单处理完成 } diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index 9379565..43e6d82 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -193,6 +193,7 @@ export default class MapConroler extends cc.Component { // cc.fx.GameConfig.GM_INFO.level += 1; // cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); // }, 1000); + cc.fx.GameConfig.GM_INFO.sceneValue = "GameScene"; MiniGameSdk.API.setNewCloudlevel(); @@ -2910,6 +2911,25 @@ export default class MapConroler extends cc.Component { this.stopTimeCutDown(); } + trackFinishi(name) { + let overTime = Date.now(); + this.count_Time = overTime - this.count_Time; + + let endLevel = false; + if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.GameplayType == 1) { + endLevel = true; + } + let data = { + time: this.count_Time, + add_Time: this.add_Time, + is_frenzy: this.is_frenzy, + result: name, + infinity: endLevel, + } + + cc.fx.GameTool.shushu_Track("finish_stage", data); + } + homeBtn() { this.powerState = cc.fx.GameTool.getUserPowerTime(); @@ -2929,22 +2949,8 @@ export default class MapConroler extends cc.Component { .start(); this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("Health").active = false; this.node.parent.parent.getChildByName("Lose").getChildByName("lose").getChildByName("WinStreak").active = false; - let overTime = Date.now(); - this.count_Time = overTime - this.count_Time; - let endLevel = false; - if (cc.fx.GameTool.maxLevel() && cc.fx.GameConfig.GM_INFO.GameplayType == 1) { - endLevel = true; - } - let data = { - time: this.count_Time, - add_Time: this.add_Time, - is_frenzy: this.is_frenzy, - result: "fail", - "infinity": endLevel, - } - - cc.fx.GameTool.shushu_Track("finish_stage", data); + this.trackFinishi("fail"); if (cc.fx.GameConfig.GM_INFO.otherLevel == 0) { let data2 = { is_frenzy: this.is_frenzy, @@ -3023,6 +3029,7 @@ export default class MapConroler extends cc.Component { cc.fx.GameConfig.LEVEL_INFO_init(false, 0, false); if (cc.fx.GameConfig.GM_INFO.otherLevel == 0 && customEventData == false) { cc.fx.GameTool.setWinStreak("fail"); + MapConroler._instance.trackFinishi("give_up"); } if (this.new_mode == 3) { this.node.parent.parent.getChildByName("Win").active = false; diff --git a/assets/Script/SceneManager.ts b/assets/Script/SceneManager.ts index 3f3a195..df99c96 100644 --- a/assets/Script/SceneManager.ts +++ b/assets/Script/SceneManager.ts @@ -274,7 +274,7 @@ export default class SceneManager extends cc.Component { add_Time: add_Time, is_frenzy: MapConroler._instance.is_frenzy, result: "give_up", - "infinity": endLevel, + infinity: endLevel, } cc.fx.GameTool.shushu_Track("finish_stage", data); let data2 = { diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 05e545a..433bfed 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -384,7 +384,7 @@ var GameTool = { add_Time: time2, is_frenzy: is_frenzy, result: "success", - "infinity": endLevel, + infinity: endLevel, } cc.fx.GameTool.shushu_Track("finish_stage", data); let data2 = { diff --git a/assets/Script/module/Tool/array.js b/assets/Script/module/Tool/array.js new file mode 100644 index 0000000..75f5f5b --- /dev/null +++ b/assets/Script/module/Tool/array.js @@ -0,0 +1,49 @@ + +var array = [ + "wcx_96205605311161768233499423", + "wcx_26262767799471768233565211", + "wcx_36750756735001768233592201", + "wcx_7341664513091768234679321", + "wcx_32239512358441768243386320", + "wcx_85350379688381768233721575", + "wcx_95235250229731768238836922", + "wcx_47458295682381768235708608", + "wcx_85492165919541768236730149", + "wcx_76006056830781768239750738", + "wcx_42264354935381768240671788", + "wcx_16583422850181768240692798", + "wcx_72814178286561768240709184", + "wcx_43021282739121768243235329", + "wcx_62955050843461768243267435", + "wcx_63949435052531768243286598", + "wcx_31015871782771768245177128", + "wcx_40776630615431768259034616", + "wcx_37948881446161768243861924", + "wcx_16668836737251768245575425", + "wcx_40175669943291768246001463", + "wcx_1144064443651768252595960", + "wcx_97891028669091768211386251", + "wcx_73037062842341768192807391", + "wcx_81715017180301768256112096", + "wcx_61766234844021768259433412", + "wcx_8346895275261768262791489", + "wcx_56258243876721768264984847", + "wcx_68984384576811768223264032", + "wcx_75876153294261768222606757", + "wcx_29654753650881768263709095", + "wcx_77152194967981768267976337", + "wcx_71613623174611768268032506", + "wcx_97384424204271768228210065", + "wcx_27953251280741768270265315", + "wcx_52979487245351768270329801", + "wcx_20610784968591768270542936", + "wcx_40486393346271768270631746", + "wcx_81740599971091768270886709", + "wcx_39900849049741768270976707", + "wcx_10844381742631768271230281", + "wcx_85964863827781768230424869", + "wcx_18001763938691768271404931", + "wcx_47624771290971768271982176", + "wcx_83943953899881768222569123", + "wcx_90027852592101768220676199", +] \ No newline at end of file diff --git a/assets/Script/module/Tool/array.js.meta b/assets/Script/module/Tool/array.js.meta new file mode 100644 index 0000000..978e130 --- /dev/null +++ b/assets/Script/module/Tool/array.js.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "dd43385f-9aca-4134-a943-fabd6e4c444f", + "importer": "javascript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/setUi.ts b/assets/Script/setUi.ts index 0d17a95..e9a87db 100644 --- a/assets/Script/setUi.ts +++ b/assets/Script/setUi.ts @@ -140,6 +140,7 @@ export default class setUi extends cc.Component { MapConroler._instance.returnHome(); } else { + MapConroler._instance.trackFinishi("give_up"); MapConroler._instance.powerState = cc.fx.GameTool.getUserPowerTime(); if (MapConroler._instance.powerState == false) { let pauseNode = null; @@ -180,7 +181,8 @@ export default class setUi extends cc.Component { returnHome() { if (cc.fx.GameConfig.GM_INFO.otherLevel == 0) { - cc.fx.GameTool.setWinStreak("fail"); + cc.fx.GameTool.setWinStreak("give_up"); + MapConroler._instance.trackFinishi(); } MapConroler._instance.returnHome(); @@ -222,6 +224,7 @@ export default class setUi extends cc.Component { console.log("从二级页面点击重开"); if (cc.fx.GameConfig.GM_INFO.otherLevel == 0) { cc.fx.GameTool.setWinStreak("fail"); + MapConroler._instance.trackFinishi("give_up"); } MapConroler._instance.againLevel(); } @@ -250,6 +253,7 @@ export default class setUi extends cc.Component { else { console.log("从二级页面点击重开"); cc.fx.GameTool.setWinStreak("fail"); + MapConroler._instance.trackFinishi("give_up"); MapConroler._instance.againLevel(); } } diff --git a/assets/custom/Json/level956.json b/assets/custom/Json/level956.json new file mode 100644 index 0000000..3f7c7d4 --- /dev/null +++ b/assets/custom/Json/level956.json @@ -0,0 +1,317 @@ +{ + "LEVEL_INFO": [ + { + "risefall": [], + "id": "956", + "map": [ + 8, + 8 + ], + "time": 100, + "gap": [ + { + "x": 1, + "y": 6, + "z": 0 + }, + { + "x": 1, + "y": 5, + "z": 0 + }, + { + "x": 1, + "y": 4, + "z": 0 + }, + { + "x": 1, + "y": 3, + "z": 0 + } + ] + } + ], + "BLOCK_INFO": [ + [ + { + "block": 2, + "color": 7, + "type": 9, + "position": { + "x": 0, + "y": 0, + "z": 0 + }, + "adhesiveTime": 2, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "id": 210 + }, + { + "block": 0, + "color": 1, + "type": 9, + "position": { + "x": 0, + "y": -120, + "z": 0 + }, + "adhesiveTime": 1, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "id": 220 + }, + { + "block": 3, + "color": 8, + "type": 14, + "position": { + "x": 0, + "y": -240, + "z": 0 + }, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "id": 230 + }, + { + "block": 2, + "color": 6, + "type": 14, + "position": { + "x": 360, + "y": -360, + "z": 0 + }, + "floor": 2, + "floorTime": 6, + "floorMove": true, + "id": 240 + }, + { + "block": 1, + "color": 9, + "type": 14, + "position": { + "x": 240, + "y": 240, + "z": 0 + }, + "floor": 3, + "floorTime": 9, + "floorMove": true, + "id": 250 + }, + { + "block": 21, + "color": 7, + "type": 0, + "position": { + "x": -120, + "y": 120, + "z": 0 + }, + "id": 260 + }, + { + "block": 1, + "color": 3, + "type": 0, + "position": { + "x": -120, + "y": -360, + "z": 0 + }, + "id": 270 + }, + { + "block": 1, + "color": 1, + "type": 0, + "position": { + "x": 240, + "y": -240, + "z": 0 + }, + "id": 280 + }, + { + "block": 0, + "color": 1, + "type": 0, + "position": { + "x": 0, + "y": -360, + "z": 0 + }, + "id": 290 + }, + { + "block": 2, + "color": 4, + "type": 0, + "position": { + "x": 120, + "y": -120, + "z": 0 + }, + "id": 300 + }, + { + "block": 2, + "color": 8, + "type": 0, + "position": { + "x": 240, + "y": 0, + "z": 0 + }, + "id": 310 + }, + { + "block": 2, + "color": 6, + "type": 0, + "position": { + "x": 360, + "y": 0, + "z": 0 + }, + "id": 320 + }, + { + "block": 1, + "color": 5, + "type": 0, + "position": { + "x": 240, + "y": -360, + "z": 0 + }, + "id": 330 + } + ] + ], + "WALL_INFO": [ + [ + { + "id": 957, + "num": 0, + "color": 6, + "special": 0, + "length": 2 + }, + { + "id": 958, + "num": 1, + "color": 6, + "special": 0, + "length": 0 + }, + { + "id": 959, + "num": 9, + "color": 3, + "special": 0, + "length": 2 + }, + { + "id": 960, + "num": 11, + "color": 3, + "special": 0, + "length": 0 + }, + { + "id": 961, + "num": 15, + "color": 5, + "special": 0, + "length": 2 + }, + { + "id": 962, + "num": 17, + "color": 5, + "special": 0, + "length": 0 + }, + { + "id": 963, + "num": 23, + "color": 1, + "special": 0, + "length": 1 + }, + { + "id": 964, + "num": 21, + "color": 7, + "special": 0, + "length": 2 + }, + { + "id": 965, + "num": 22, + "color": 7, + "special": 0, + "length": 0 + }, + { + "id": 966, + "num": 19, + "color": 4, + "special": 6, + "length": 2, + "lockTime": 3 + }, + { + "id": 967, + "num": 20, + "color": 4, + "special": 6, + "length": 0, + "lockTime": 3 + }, + { + "id": 968, + "num": 12, + "color": 9, + "special": 0, + "length": 2 + }, + { + "id": 969, + "num": 14, + "color": 9, + "special": 0, + "length": 0 + }, + { + "id": 970, + "num": 2, + "color": 8, + "special": 0, + "length": 3 + }, + { + "id": 971, + "num": 8, + "color": 8, + "special": 0, + "length": 0 + }, + { + "id": 972, + "num": 10, + "color": 8, + "special": 0, + "length": 0 + } + ] + ] +} \ No newline at end of file diff --git a/assets/custom/Json/level956.json.meta b/assets/custom/Json/level956.json.meta new file mode 100644 index 0000000..2cba481 --- /dev/null +++ b/assets/custom/Json/level956.json.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.2", + "uuid": "7b472e87-44d1-4d4d-9fbd-bae3c862e2ef", + "importer": "json", + "subMetas": {} +} \ No newline at end of file