This commit is contained in:
COMPUTER\EDY 2026-03-17 10:22:53 +08:00
parent 796be75738
commit a05cd8dc91
12 changed files with 1004 additions and 49 deletions

View File

@ -1337,12 +1337,13 @@ export default class Block extends cc.Component {
MapConroler._instance.addTime(this.block_Info.addTime);
}
if (this.node) {
this.moveFlower();
}
this.scheduleCallback2 = setTimeout(() => {
MapConroler._instance.blockNum -= 1;
MapConroler._instance.special_Treatment(this.node, type, false);
if (this.node) {
this.moveFlower();
}
// console.log("魔法棒消除");
// let colorTemp = this.color;
// MapConroler._instance.checkColor(colorTemp, true, this.node);
@ -1513,15 +1514,16 @@ export default class Block extends cc.Component {
MapConroler._instance.addTime(this.block_Info.addTime);
}
if (this.node) {
this.moveFlower();
}
this.scheduleCallback2 = setTimeout(() => {
//如果方块可以消除
MapConroler._instance.blockNum -= 1;
MapConroler._instance.special_Treatment(this.node, true, false);
if (this.node) {
this.moveFlower();
}
var self = this;
this.removeMapBlock();
MapConroler._instance.judgeWin(0);
@ -1563,7 +1565,6 @@ export default class Block extends cc.Component {
MapConroler._instance.nextLevel(0);
if (this.node) {
// this.moveFlower();
this.over = true;
this.node.active = false;
this.node.removeFromParent();
@ -2893,6 +2894,12 @@ export default class Block extends cc.Component {
}
}
}
onDestroy() {
if (this.scheduleCallback) clearTimeout(this.scheduleCallback);
if (this.scheduleCallback2) clearTimeout(this.scheduleCallback2);
if (this.scheduleCallback3) clearTimeout(this.scheduleCallback3);
}
}

View File

@ -280,9 +280,11 @@ export default class GameManager extends cc.Component {
if (time == undefined || time == null) {
time = timestamp2;
}
else {
MiniGameSdk.API.shushu_userSet(time);
}
}
}
if (data.data.task) {
let task = JSON.parse(data.data.task);

View File

@ -194,6 +194,7 @@ export default class MapConroler extends cc.Component {
private magicEffect1: cc.Node = null; // 第一套特效节点
private magicEffect2: cc.Node = null; // 第二套特效节点
questionArray: any[];
blocks2: any[];
onLoad() {
//以下为检验关卡
@ -227,6 +228,7 @@ export default class MapConroler extends cc.Component {
});
this.wall_Pass = [];
this.blocks = [];
this.blocks2 = [];
this.adhesiveBlock = []; //粘合快数组
this.barrierBlock = [];
this.teamBlocks = []; //可移动地板块组队
@ -729,6 +731,7 @@ export default class MapConroler extends cc.Component {
else {
// console.log("创建无色障碍块");
}
this.blocks2.push(block);
if (blockInfo.type == 1) {
let info = {
id: blockInfo.id + 1,
@ -755,6 +758,7 @@ export default class MapConroler extends cc.Component {
this.blocks.push(blockUp);
this.blockNum += 1;
}
this.blocks2.push(blockUp);
} else if (blockInfo.type == 9) {
nianHe = true;
if (blockInfo.adhesiveTime < 2) {
@ -779,6 +783,7 @@ export default class MapConroler extends cc.Component {
this.blocks.push(blockUp);
this.blockNum += 1;
}
this.blocks2.push(blockUp);
} else {
block.getComponent("Block").init(blockInfo, null, null, null, null);
@ -2991,67 +2996,71 @@ export default class MapConroler extends cc.Component {
addMoveFloor() {
this.teamBlocks = [];
for (let i = 0; i < this.blocks.length; i++) {
if (this.blocks[i].getComponent("Block").block_Info) {
let blockInfo = this.blocks[i].getComponent("Block").block_Info;
for (let i = 0; i < this.blocks2.length; i++) {
if (this.blocks2[i].getComponent("Block").block_Info) {
let blockInfo = this.blocks2[i].getComponent("Block").block_Info;
// console.log("floorMove", blockInfo.floor);
if (blockInfo.floorMove != undefined) {
if (blockInfo.floorMove == true) {
if (this.teamBlocks.length == 0) {
// console.log("放入一个移动地板块");
this.teamBlocks.push(this.blocks[i]);
this.blocks[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks.length - 1)) {
// console.log("结束1");
this.removeFloor();
console.log("放入一个移动地板块1");
this.teamBlocks.push(this.blocks2[i]);
this.blocks2[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks2.length - 1)) {
console.log("结束1");
this.removeFloor(true);
}
} else {
if (blockInfo.floor == this.teamBlocks[0].getComponent("Block").block_Info.floor) {
this.teamBlocks.push(this.blocks[i]);
// console.log("放入一个移动地板块");
this.blocks[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks.length - 1)) {
// console.log("结束2");
this.removeFloor();
this.teamBlocks.push(this.blocks2[i]);
console.log("放入一个移动地板块2");
this.blocks2[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks2.length - 1)) {
console.log("结束2");
this.removeFloor(true);
}
} else {
// console.log("结束3")
this.removeFloor();
this.teamBlocks.push(this.blocks[i]);
this.blocks[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks.length - 1)) {
// console.log("结束4");
this.removeFloor();
console.log("结束3")
this.removeFloor(false);
this.teamBlocks.push(this.blocks2[i]);
this.blocks2[i].getComponent("Block").setTeamBlocks(this.teamBlocks);
if (i == (this.blocks2.length - 1)) {
console.log("结束4");
this.removeFloor(true);
}
}
}
}
else {
if (i == (this.blocks.length - 1)) {
// console.log("结束5");
this.removeFloor();
if (i == (this.blocks2.length - 1)) {
console.log("结束5");
this.removeFloor(true);
}
}
}
else {
if (i == (this.blocks.length - 1)) {
// console.log("结束6");
this.removeFloor();
if (i == (this.blocks2.length - 1)) {
console.log("结束6");
this.removeFloor(true);
}
}
}
else {
if (i == (this.blocks.length - 1)) {
// console.log("结束7");
this.removeFloor();
if (i == (this.blocks2.length - 1)) {
console.log("结束7");
this.removeFloor(true);
}
}
}
}
removeFloor() {
removeFloor(type) {
console.log("结束__________");
if (type == true) {
this.blocks2 = [];
}
if (this.teamBlocks.length > 0) {
for (let j = 0; j < this.teamBlocks.length; j++) {
this.teamBlocks[j].getComponent("Block").setMoveFloor();
@ -5046,7 +5055,6 @@ export default class MapConroler extends cc.Component {
this.propCanbeUse = false; //是否能使用道具
return result;
}
}
else {
// console.log("普通门,不可通过")

View File

@ -1591,7 +1591,7 @@ export namespace MiniGameSdk {
//@ts-ignore
if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) {
// console.log("设置用户注册属性");
API._ta.userSetOnce({ register_time: time });
API._ta.userSet({ register_time: time });
API._ta.userSetOnce({ uid: cc.fx.GameConfig.GM_INFO.userId.toString() });
}
}

View File

@ -594,7 +594,7 @@ export default class Wall extends cc.Component {
else {
this.jump = null;
setTimeout(() => {
console.log("被跳走门数组", this.teamDoors[0].node.uuid);
// console.log("被跳走门数组", this.teamDoors[0].node.uuid);
}, 1000);
cc.tween(this.jumpNode)

View File

@ -441,8 +441,18 @@ var GameTool = {
//关卡上限
maxLevel() {
let jg = false;
if (cc.fx.GameConfig.GM_INFO.level > 1319) {
cc.fx.GameConfig.GM_INFO.level = 1320;
//措施
if (cc.fx.GameConfig.GM_INFO.level > 1300) {
console.log("异常数据回归");
cc.fx.GameConfig.GM_INFO.level = 1300;
const timestamp = Date.now();
let levelInfo = { "level": 1300, "timestamp": timestamp };
cc.fx.StorageMessage.setStorage("level", levelInfo);
}
if (cc.fx.GameConfig.GM_INFO.level > 1299) {
cc.fx.GameConfig.GM_INFO.level = 1300;
jg = true;
}
return jg;

View File

@ -44,6 +44,9 @@ export default class Question extends cc.Component {
change(type) {
if (this.node) {
if (this.node.parent) {
// if (this.node.parent.getComponent("Block").type == 16) {
// return;
// }
if (type) {
this.node.getChildByName("lock").active = false;
this.node.getChildByName("open").active = true;

View File

@ -231,7 +231,7 @@
"adhesiveTime": 2,
"floor": 1,
"floorTime": 6,
"floorMove": true,
"floorMove": false,
"id": 360
},
{
@ -246,7 +246,7 @@
"adhesiveTime": 1,
"floor": 1,
"floorTime": 6,
"floorMove": true,
"floorMove": false,
"id": 370
},
{
@ -261,7 +261,7 @@
"addTime": 40,
"floor": 1,
"floorTime": 6,
"floorMove": true,
"floorMove": false,
"id": 380
},
{
@ -276,7 +276,7 @@
"freezeTime": 9,
"floor": 1,
"floorTime": 6,
"floorMove": true,
"floorMove": false,
"id": 390
},
{

View File

@ -0,0 +1,449 @@
{
"LEVEL_INFO": [
{
"risefall": [],
"id": "1339",
"map": [
9,
10
],
"time": 110,
"gap": []
}
],
"BLOCK_INFO": [
[
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -480,
"z": 0
},
"id": 210
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -240,
"z": 0
},
"id": 220
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -360,
"z": 0
},
"id": 230
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -120,
"z": 0
},
"id": 240
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -60,
"y": -120,
"z": 0
},
"id": 250
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -240,
"z": 0
},
"id": 260
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -120,
"z": 0
},
"id": 270
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 180,
"y": -120,
"z": 0
},
"id": 280
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -480,
"z": 0
},
"id": 290
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -360,
"z": 0
},
"id": 300
},
{
"block": 2,
"color": 2,
"type": 0,
"position": {
"x": 180,
"y": -480,
"z": 0
},
"id": 310
},
{
"block": 2,
"color": 5,
"type": 0,
"position": {
"x": -60,
"y": -480,
"z": 0
},
"id": 320
},
{
"block": 0,
"color": 11,
"type": 0,
"position": {
"x": 60,
"y": -120,
"z": 0
},
"id": 330
},
{
"block": 2,
"color": 2,
"type": 1,
"position": {
"x": -300,
"y": -120,
"z": 0
},
"stacking": 5,
"id": 340
},
{
"block": 21,
"color": 10,
"type": 1,
"position": {
"x": -300,
"y": 120,
"z": 0
},
"stacking": 2,
"id": 350
},
{
"block": 22,
"color": 6,
"type": 1,
"position": {
"x": 420,
"y": 120,
"z": 0
},
"stacking": 5,
"id": 360
},
{
"block": 4,
"color": 1,
"type": 20,
"position": {
"x": -300,
"y": -480,
"z": 0
},
"colorArray": "08",
"id": 370
},
{
"block": 2,
"color": 9,
"type": 20,
"position": {
"x": 180,
"y": 240,
"z": 0
},
"colorArray": "80",
"id": 380
},
{
"block": 2,
"color": 7,
"type": 20,
"position": {
"x": -60,
"y": 240,
"z": 0
},
"colorArray": "62",
"id": 390
},
{
"block": 4,
"color": 3,
"type": 20,
"position": {
"x": 420,
"y": -480,
"z": 0
},
"colorArray": "26",
"id": 400
},
{
"block": 0,
"color": 7,
"type": 1,
"position": {
"x": 60,
"y": 360,
"z": 0
},
"stacking": 9,
"id": 410
},
{
"block": 1,
"color": 5,
"type": 16,
"position": {
"x": 420,
"y": 360,
"z": 0
},
"questionTime": 11,
"id": 420
},
{
"block": 4,
"color": 1,
"type": 16,
"position": {
"x": 60,
"y": -480,
"z": 0
},
"questionTime": 10,
"id": 430
},
{
"block": 1,
"color": 2,
"type": 16,
"position": {
"x": -180,
"y": 360,
"z": 0
},
"questionTime": 8,
"id": 450
},
{
"block": 11,
"color": 6,
"type": 0,
"position": {
"x": -60,
"y": 0,
"z": 0
},
"floor": 2,
"floorTime": 9,
"floorMove": true,
"id": 460
},
{
"block": 0,
"color": 11,
"type": 0,
"position": {
"x": 180,
"y": 0,
"z": 0
},
"floor": 2,
"floorTime": 9,
"floorMove": true,
"id": 470
}
]
],
"WALL_INFO": [
[
{
"id": 1340,
"num": 1,
"color": 3,
"special": 0,
"length": 3
},
{
"id": 1341,
"num": 2,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 1342,
"num": 3,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 1343,
"num": 4,
"color": 6,
"special": 3,
"length": 2,
"freeze": 9
},
{
"id": 1344,
"num": 5,
"color": 6,
"special": 3,
"length": 0,
"freeze": 9
},
{
"id": 1345,
"num": 11,
"color": 2,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": false
},
{
"id": 1346,
"num": 13,
"color": 2,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": false
},
{
"id": 1347,
"num": 17,
"color": 5,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": false
},
{
"id": 1348,
"num": 19,
"color": 5,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": false
},
{
"id": 1349,
"num": 26,
"color": 10,
"special": 3,
"length": 2,
"freeze": 14
},
{
"id": 1350,
"num": 27,
"color": 10,
"special": 3,
"length": 0,
"freeze": 14
},
{
"id": 1351,
"num": 23,
"color": 1,
"special": 0,
"length": 3
},
{
"id": 1352,
"num": 24,
"color": 1,
"special": 0,
"length": 0
},
{
"id": 1353,
"num": 25,
"color": 1,
"special": 0,
"length": 0
},
{
"id": 1354,
"num": 16,
"color": 7,
"special": 0,
"length": 1
},
{
"id": 1355,
"num": 12,
"color": 9,
"special": 0,
"length": 1
}
]
]
}

View File

@ -0,0 +1,6 @@
{
"ver": "1.0.2",
"uuid": "6077b131-9987-4edc-acfb-a6758dda2edd",
"importer": "json",
"subMetas": {}
}

View File

@ -0,0 +1,464 @@
{
"LEVEL_INFO": [
{
"risefall": [],
"id": "1339",
"map": [
9,
10
],
"time": 110,
"gap": []
}
],
"BLOCK_INFO": [
[
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -480,
"z": 0
},
"id": 210
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -240,
"z": 0
},
"id": 220
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -360,
"z": 0
},
"id": 230
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -180,
"y": -120,
"z": 0
},
"id": 240
},
{
"block": 23,
"color": 3,
"type": 0,
"position": {
"x": -60,
"y": -120,
"z": 0
},
"id": 250
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -240,
"z": 0
},
"id": 260
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -120,
"z": 0
},
"id": 270
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 180,
"y": -120,
"z": 0
},
"id": 280
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -480,
"z": 0
},
"id": 290
},
{
"block": 23,
"color": 1,
"type": 0,
"position": {
"x": 300,
"y": -360,
"z": 0
},
"id": 300
},
{
"block": 2,
"color": 2,
"type": 0,
"position": {
"x": 180,
"y": -480,
"z": 0
},
"id": 310
},
{
"block": 2,
"color": 5,
"type": 0,
"position": {
"x": -60,
"y": -480,
"z": 0
},
"id": 320
},
{
"block": 0,
"color": 11,
"type": 0,
"position": {
"x": 60,
"y": -120,
"z": 0
},
"id": 330
},
{
"block": 2,
"color": 2,
"type": 1,
"position": {
"x": -300,
"y": -120,
"z": 0
},
"stacking": 5,
"id": 340
},
{
"block": 21,
"color": 10,
"type": 1,
"position": {
"x": -300,
"y": 120,
"z": 0
},
"stacking": 2,
"id": 350
},
{
"block": 22,
"color": 6,
"type": 1,
"position": {
"x": 420,
"y": 120,
"z": 0
},
"stacking": 5,
"id": 360
},
{
"block": 4,
"color": 1,
"type": 20,
"position": {
"x": -300,
"y": -480,
"z": 0
},
"colorArray": "08",
"id": 370
},
{
"block": 2,
"color": 9,
"type": 20,
"position": {
"x": 180,
"y": 240,
"z": 0
},
"colorArray": "80",
"id": 380
},
{
"block": 2,
"color": 7,
"type": 20,
"position": {
"x": -60,
"y": 240,
"z": 0
},
"colorArray": "62",
"id": 390
},
{
"block": 4,
"color": 3,
"type": 20,
"position": {
"x": 420,
"y": -480,
"z": 0
},
"colorArray": "26",
"id": 400
},
{
"block": 0,
"color": 7,
"type": 1,
"position": {
"x": 60,
"y": 360,
"z": 0
},
"stacking": 9,
"id": 410
},
{
"block": 1,
"color": 5,
"type": 16,
"position": {
"x": 420,
"y": 360,
"z": 0
},
"questionTime": 11,
"id": 420
},
{
"block": 4,
"color": 1,
"type": 16,
"position": {
"x": 60,
"y": -480,
"z": 0
},
"questionTime": 10,
"id": 430
},
{
"block": 2,
"color": 2,
"type": 1,
"position": {
"x": 420,
"y": -120,
"z": 0
},
"stacking": 3,
"floor": 1,
"floorTime": 7,
"floorMove": true,
"id": 440
},
{
"block": 1,
"color": 2,
"type": 16,
"position": {
"x": -180,
"y": 360,
"z": 0
},
"questionTime": 8,
"id": 450
},
{
"block": 11,
"color": 6,
"type": 0,
"position": {
"x": -60,
"y": 0,
"z": 0
},
"floor": 2,
"floorTime": 9,
"floorMove": true,
"id": 460
},
{
"block": 0,
"color": 11,
"type": 0,
"position": {
"x": 180,
"y": 0,
"z": 0
},
"floor": 2,
"floorTime": 9,
"floorMove": true,
"id": 470
}
]
],
"WALL_INFO": [
[
{
"id": 1340,
"num": 1,
"color": 3,
"special": 0,
"length": 3
},
{
"id": 1341,
"num": 2,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 1342,
"num": 3,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 1343,
"num": 4,
"color": 6,
"special": 3,
"length": 2,
"freeze": 9
},
{
"id": 1344,
"num": 5,
"color": 6,
"special": 3,
"length": 0,
"freeze": 9
},
{
"id": 1345,
"num": 11,
"color": 2,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": false
},
{
"id": 1346,
"num": 13,
"color": 2,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": false
},
{
"id": 1347,
"num": 17,
"color": 5,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": false
},
{
"id": 1348,
"num": 19,
"color": 5,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": false
},
{
"id": 1349,
"num": 26,
"color": 10,
"special": 3,
"length": 2,
"freeze": 14
},
{
"id": 1350,
"num": 27,
"color": 10,
"special": 3,
"length": 0,
"freeze": 14
},
{
"id": 1351,
"num": 23,
"color": 1,
"special": 0,
"length": 3
},
{
"id": 1352,
"num": 24,
"color": 1,
"special": 0,
"length": 0
},
{
"id": 1353,
"num": 25,
"color": 1,
"special": 0,
"length": 0
},
{
"id": 1354,
"num": 16,
"color": 7,
"special": 0,
"length": 1
},
{
"id": 1355,
"num": 12,
"color": 9,
"special": 0,
"length": 1
}
]
]
}

View File

@ -0,0 +1,6 @@
{
"ver": "1.0.2",
"uuid": "115e7305-696f-4e6b-abd4-8bd77e234861",
"importer": "json",
"subMetas": {}
}