From ad67b3d06ec670ff7dc42aaa4e2edaa02926492d Mon Sep 17 00:00:00 2001 From: "COMPUTER\\EDY" <249929363@qq.com> Date: Wed, 14 Jan 2026 14:43:39 +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/Map.ts | 10 +- assets/Script/module/List/scrollviewList.ts | 4 +- assets/custom/Json/level957.json | 332 +++++++++++++++++++ assets/custom/Json/level958.json | 343 ++++++++++++++++++++ 4 files changed, 682 insertions(+), 7 deletions(-) create mode 100644 assets/custom/Json/level957.json create mode 100644 assets/custom/Json/level958.json diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index d482982..aa48c11 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -188,11 +188,11 @@ export default class MapConroler extends cc.Component { onLoad() { //以下为检验关卡 - console.log("当前关卡", cc.fx.GameConfig.GM_INFO.level); - setTimeout(() => { - cc.fx.GameConfig.GM_INFO.level += 1; - cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); - }, 1000); + // console.log("当前关卡", cc.fx.GameConfig.GM_INFO.level); + // setTimeout(() => { + // cc.fx.GameConfig.GM_INFO.level += 1; + // cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); + // }, 1000); cc.fx.GameConfig.GM_INFO.sceneValue = "GameScene"; diff --git a/assets/Script/module/List/scrollviewList.ts b/assets/Script/module/List/scrollviewList.ts index 6c52f5a..9a05d3b 100644 --- a/assets/Script/module/List/scrollviewList.ts +++ b/assets/Script/module/List/scrollviewList.ts @@ -356,7 +356,7 @@ export default class scrollViewList extends cc.Component { * 清空内容 */ private clearContent() { - if (this.itemNodes) { + if (this.itemNodes && this.itemNodes.length != null) { for (let i = 0; i < this.itemNodes.length; i++) { if (this.nodePoolMgr && this.itemNodes[i]) { this.nodePoolMgr.putItem(this.itemNodes[i]); @@ -366,7 +366,7 @@ export default class scrollViewList extends cc.Component { // 回收所有节点 this.itemNodes = []; if (this.content) { - if (this.content.children) { + if (this.content.children && this.content.children.length != null) { if (this.content.children.length > 0) { this.content.removeAllChildren(); } diff --git a/assets/custom/Json/level957.json b/assets/custom/Json/level957.json new file mode 100644 index 0000000..83bea7d --- /dev/null +++ b/assets/custom/Json/level957.json @@ -0,0 +1,332 @@ +{ + "LEVEL_INFO": [ + { + "risefall": [], + "id": "957", + "map": [ + 8, + 8 + ], + "time": 125, + "gap": [ + { + "x": 4, + "y": 1, + "z": 0 + }, + { + "x": 5, + "y": 1, + "z": 0 + }, + { + "x": 6, + "y": 1, + "z": 0 + }, + { + "x": 1, + "y": 6, + "z": 0 + }, + { + "x": 1, + "y": 5, + "z": 0 + } + ] + } + ], + "BLOCK_INFO": [ + [ + { + "block": 0, + "color": 11, + "type": 0, + "position": { + "x": 0, + "y": -120, + "z": 0 + }, + "id": 210 + }, + { + "block": 0, + "color": 9, + "type": 0, + "position": { + "x": 120, + "y": -240, + "z": 0 + }, + "id": 220 + }, + { + "block": 14, + "color": 5, + "type": 0, + "position": { + "x": 240, + "y": -240, + "z": 0 + }, + "id": 230 + }, + { + "block": 2, + "color": 9, + "type": 14, + "position": { + "x": -240, + "y": -120, + "z": 0 + }, + "id": 240 + }, + { + "block": 20, + "color": 4, + "type": 14, + "position": { + "x": -120, + "y": -360, + "z": 0 + }, + "id": 250 + }, + { + "block": 2, + "color": 6, + "type": 14, + "position": { + "x": -120, + "y": -240, + "z": 0 + }, + "id": 260 + }, + { + "block": 0, + "color": 5, + "type": 14, + "position": { + "x": 360, + "y": 0, + "z": 0 + }, + "id": 270 + }, + { + "block": 0, + "color": 10, + "type": 14, + "position": { + "x": 360, + "y": -240, + "z": 0 + }, + "id": 280 + }, + { + "block": 2, + "color": 7, + "type": 8, + "position": { + "x": 0, + "y": -360, + "z": 0 + }, + "id": 290 + }, + { + "block": 1, + "color": 3, + "type": 7, + "position": { + "x": 240, + "y": 0, + "z": 0 + }, + "id": 300 + }, + { + "block": 2, + "color": 10, + "type": 17, + "position": { + "x": -120, + "y": 120, + "z": 0 + }, + "boomTime": 1, + "floor": 1, + "floorTime": 3, + "floorMove": true, + "id": 310 + }, + { + "block": 1, + "color": 3, + "type": 9, + "position": { + "x": 120, + "y": 240, + "z": 0 + }, + "adhesiveTime": 2, + "floor": 1, + "floorTime": 3, + "floorMove": true, + "id": 320 + }, + { + "block": 1, + "color": 10, + "type": 9, + "position": { + "x": 120, + "y": 120, + "z": 0 + }, + "adhesiveTime": 1, + "floor": 1, + "floorTime": 3, + "floorMove": true, + "id": 330 + }, + { + "block": 2, + "color": 6, + "type": 0, + "position": { + "x": 240, + "y": 120, + "z": 0 + }, + "floor": 1, + "floorTime": 3, + "floorMove": true, + "id": 340 + } + ] + ], + "WALL_INFO": [ + [ + { + "id": 958, + "num": 16, + "color": 4, + "special": 0, + "length": 2 + }, + { + "id": 959, + "num": 18, + "color": 4, + "special": 0, + "length": 0 + }, + { + "id": 960, + "num": 19, + "color": 6, + "special": 0, + "length": 2 + }, + { + "id": 961, + "num": 20, + "color": 6, + "special": 0, + "length": 0 + }, + { + "id": 962, + "num": 0, + "color": 10, + "special": 0, + "length": 2, + "longAndShort": 12, + "order": true + }, + { + "id": 963, + "num": 1, + "color": 10, + "special": 0, + "length": 0, + "longAndShort": 12, + "order": true + }, + { + "id": 964, + "num": 21, + "color": 9, + "special": 0, + "length": 2, + "longAndShort": 12, + "order": false + }, + { + "id": 965, + "num": 22, + "color": 9, + "special": 0, + "length": 0, + "longAndShort": 12, + "order": false + }, + { + "id": 966, + "num": 4, + "color": 5, + "special": 0, + "length": 3, + "longAndShort": 13, + "order": false + }, + { + "id": 967, + "num": 8, + "color": 5, + "special": 0, + "length": 0, + "longAndShort": 13, + "order": false + }, + { + "id": 968, + "num": 10, + "color": 5, + "special": 0, + "length": 0, + "longAndShort": 13, + "order": false + }, + { + "id": 969, + "num": 3, + "color": 3, + "special": 6, + "length": 1, + "lockTime": 5 + }, + { + "id": 970, + "num": 9, + "color": 7, + "special": 3, + "length": 2, + "freeze": 9 + }, + { + "id": 971, + "num": 11, + "color": 7, + "special": 3, + "length": 0, + "freeze": 9 + } + ] + ] +} \ No newline at end of file diff --git a/assets/custom/Json/level958.json b/assets/custom/Json/level958.json new file mode 100644 index 0000000..985cc95 --- /dev/null +++ b/assets/custom/Json/level958.json @@ -0,0 +1,343 @@ +{ + "LEVEL_INFO": [ + { + "risefall": [], + "id": "958", + "map": [ + 8, + 8 + ], + "time": 110, + "gap": [ + { + "x": 1, + "y": 6, + "z": 0 + } + ] + } + ], + "BLOCK_INFO": [ + [ + { + "block": 2, + "color": 10, + "type": 0, + "position": { + "x": 240, + "y": 120, + "z": 0 + }, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "lock": true, + "id": 210 + }, + { + "block": 1, + "color": 3, + "type": 9, + "position": { + "x": 240, + "y": 0, + "z": 0 + }, + "adhesiveTime": 2, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "id": 220 + }, + { + "block": 0, + "color": 4, + "type": 9, + "position": { + "x": 360, + "y": 0, + "z": 0 + }, + "adhesiveTime": 1, + "floor": 1, + "floorTime": 4, + "floorMove": true, + "id": 230 + }, + { + "block": 3, + "color": 8, + "type": 0, + "position": { + "x": 0, + "y": -120, + "z": 0 + }, + "floor": 2, + "floorTime": 7, + "floorMove": true, + "lock": true, + "id": 240 + }, + { + "block": 1, + "color": 9, + "type": 9, + "position": { + "x": -120, + "y": -240, + "z": 0 + }, + "adhesiveTime": 2, + "floor": 2, + "floorTime": 7, + "floorMove": true, + "id": 250 + }, + { + "block": 1, + "color": 1, + "type": 9, + "position": { + "x": -120, + "y": -360, + "z": 0 + }, + "adhesiveTime": 1, + "floor": 2, + "floorTime": 7, + "floorMove": true, + "id": 260 + }, + { + "block": 0, + "color": 5, + "type": 9, + "position": { + "x": 0, + "y": -240, + "z": 0 + }, + "adhesiveTime": 2, + "floor": 2, + "floorTime": 7, + "floorMove": true, + "id": 270 + }, + { + "block": 0, + "color": 9, + "type": 9, + "position": { + "x": 0, + "y": -360, + "z": 0 + }, + "adhesiveTime": 1, + "floor": 2, + "floorTime": 7, + "floorMove": true, + "id": 280 + }, + { + "block": 2, + "color": 9, + "type": 0, + "position": { + "x": 120, + "y": -360, + "z": 0 + }, + "id": 290 + }, + { + "block": 22, + "color": 5, + "type": 0, + "position": { + "x": 360, + "y": -360, + "z": 0 + }, + "id": 300 + }, + { + "block": 1, + "color": 3, + "type": 0, + "position": { + "x": -120, + "y": 0, + "z": 0 + }, + "id": 310 + }, + { + "block": 2, + "color": 2, + "type": 0, + "position": { + "x": -120, + "y": 120, + "z": 0 + }, + "id": 320 + }, + { + "block": 2, + "color": 10, + "type": 0, + "position": { + "x": 0, + "y": 120, + "z": 0 + }, + "id": 330 + }, + { + "block": 0, + "color": 4, + "type": 0, + "position": { + "x": 360, + "y": 240, + "z": 0 + }, + "id": 340 + }, + { + "block": 0, + "color": 5, + "type": 0, + "position": { + "x": 120, + "y": 240, + "z": 0 + }, + "id": 350 + }, + { + "block": 0, + "color": 8, + "type": 0, + "position": { + "x": 120, + "y": 120, + "z": 0 + }, + "id": 360 + } + ] + ], + "WALL_INFO": [ + [ + { + "id": 959, + "num": 1, + "color": 10, + "special": 0, + "length": 2 + }, + { + "id": 960, + "num": 2, + "color": 10, + "special": 0, + "length": 0 + }, + { + "id": 961, + "num": 3, + "color": 5, + "special": 3, + "length": 2, + "freeze": 11 + }, + { + "id": 962, + "num": 4, + "color": 5, + "special": 3, + "length": 0, + "freeze": 11 + }, + { + "id": 963, + "num": 11, + "color": 9, + "special": 0, + "length": 2 + }, + { + "id": 964, + "num": 13, + "color": 9, + "special": 0, + "length": 0 + }, + { + "id": 965, + "num": 23, + "color": 1, + "special": 0, + "length": 1 + }, + { + "id": 966, + "num": 21, + "color": 2, + "special": 0, + "length": 2 + }, + { + "id": 967, + "num": 22, + "color": 2, + "special": 0, + "length": 0 + }, + { + "id": 968, + "num": 19, + "color": 4, + "special": 4, + "length": 1 + }, + { + "id": 969, + "num": 12, + "color": 3, + "special": 0, + "length": 2 + }, + { + "id": 970, + "num": 14, + "color": 3, + "special": 0, + "length": 0 + }, + { + "id": 971, + "num": 5, + "color": 8, + "special": 0, + "length": 3 + }, + { + "id": 972, + "num": 8, + "color": 8, + "special": 0, + "length": 0 + }, + { + "id": 973, + "num": 10, + "color": 8, + "special": 0, + "length": 0 + } + ] + ] +} \ No newline at end of file