更新最新

This commit is contained in:
COMPUTER\EDY 2026-03-11 18:05:50 +08:00
parent e4920a2a18
commit 0f72616e7a
5 changed files with 45 additions and 24 deletions

View File

@ -174,6 +174,7 @@ export default class Block extends cc.Component {
pz: boolean = false; pz: boolean = false;
over: boolean = false; //方块是否失效已消失 over: boolean = false; //方块是否失效已消失
moveFloorPd: boolean = false; //是否可移动地板块移动 moveFloorPd: boolean = false; //是否可移动地板块移动
adhesiveArray: any[]; //粘合方块数组
collider: any; collider: any;
block_Info: any; block_Info: any;
_touchListener: any; _touchListener: any;
@ -203,6 +204,7 @@ export default class Block extends cc.Component {
this.adhesiveNode = []; this.adhesiveNode = [];
this.teamBlocks = []; this.teamBlocks = [];
this.colorArray = []; this.colorArray = [];
this.adhesiveArray = [];
this.moveFloorPd = false; this.moveFloorPd = false;
this.colorNode = null; this.colorNode = null;
this.collider = this.node.getComponent(cc.PolygonCollider); this.collider = this.node.getComponent(cc.PolygonCollider);
@ -313,7 +315,6 @@ export default class Block extends cc.Component {
if (block_Info.flowerReceive) { if (block_Info.flowerReceive) {
MapConroler._instance.flowerBlock.push(this); MapConroler._instance.flowerBlock.push(this);
this.flowerType = 2; this.flowerType = 2;
this.node.parent.getChildByName("Adhesive").opacity = 0;
} }
if (this.flowerType != 0) { if (this.flowerType != 0) {
this.createFlower(); this.createFlower();
@ -565,7 +566,7 @@ export default class Block extends cc.Component {
name = "0color" + this.block_Info.block; name = "0color" + this.block_Info.block;
number = 5; number = 5;
} }
console.log("本身颜色", name); // console.log("本身颜色", name);
let change_color = this.colorArray[0]; let change_color = this.colorArray[0];
if (this.colorArray.length > 1) if (this.colorArray.length > 1)
change_color = this.colorArray[1]; change_color = this.colorArray[1];
@ -574,7 +575,7 @@ export default class Block extends cc.Component {
var spriteFrame2 = this.flower_SpriteFrame._spriteFrames[name2]; var spriteFrame2 = this.flower_SpriteFrame._spriteFrames[name2];
console.log("下一个颜色", name2); // console.log("下一个颜色", name2);
this.node.getChildByName("change_color").getComponent(cc.Sprite).spriteFrame = spriteFrame2; this.node.getChildByName("change_color").getComponent(cc.Sprite).spriteFrame = spriteFrame2;
} }
@ -686,6 +687,19 @@ export default class Block extends cc.Component {
} }
} }
} }
//收集花瓣方块
if (this.block_Info.flowerReceive) {
MapConroler._instance.flowerBlock.push(this);
this.flowerType = 2;
if (this.adhesiveNode.length > 0) {
this.adhesiveNode.forEach(child => {
child.opacity = 0;
});
}
}
// let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]); // let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
} }
@ -693,8 +707,9 @@ export default class Block extends cc.Component {
addAdhesive(diraction, box) { addAdhesive(diraction, box) {
let pos = cc.v2(box.x - this.posX, box.y - this.posY); let pos = cc.v2(box.x - this.posX, box.y - this.posY);
let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[10]); let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[10]);
adhesive.parent = this.node.parent.getChildByName("Adhesive"); adhesive.parent = this.node.parent.getChildByName("Adhesive");
// adhesive.parent = this.node.getChildByName("adhesive");
adhesive.setPosition(120 * pos.x - 65 + this.node.x, 120 * pos.y + 60 + this.node.y); adhesive.setPosition(120 * pos.x - 65 + this.node.x, 120 * pos.y + 60 + this.node.y);
if (diraction == "left" || diraction == "right") { if (diraction == "left" || diraction == "right") {
adhesive.getChildByName("heng").active = true; adhesive.getChildByName("heng").active = true;
@ -903,7 +918,10 @@ export default class Block extends cc.Component {
} }
else if (this.type == BlockType.) { else if (this.type == BlockType.) {
if (this.colorNode) { if (this.colorNode) {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true); this.colorNode.getComponent("Block").changeBlockColor();
setTimeout(() => {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true);
}, 0);
} }
} }
else { else {
@ -1363,7 +1381,10 @@ export default class Block extends cc.Component {
} }
else if (this.type == BlockType.) { else if (this.type == BlockType.) {
if (this.colorNode) { if (this.colorNode) {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true); this.colorNode.getComponent("Block").changeBlockColor();
setTimeout(() => {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true);
}, 0);
} }
} }
MapConroler._instance.nextLevel(0); MapConroler._instance.nextLevel(0);
@ -1535,7 +1556,10 @@ export default class Block extends cc.Component {
} }
else if (this.type == BlockType.) { else if (this.type == BlockType.) {
if (this.colorNode) { if (this.colorNode) {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true); this.colorNode.getComponent("Block").changeBlockColor();
setTimeout(() => {
this.colorNode.getComponent("Block").restoreNomal(this.colorNode.getComponent("Block").posX, this.colorNode.getComponent("Block").posY, true);
}, 0);
} }
} }
let colorTemp = this.color; let colorTemp = this.color;
@ -2818,7 +2842,9 @@ export default class Block extends cc.Component {
this.flowerType = 0; this.flowerType = 0;
this.resetFloor(); this.resetFloor();
if (this.type == BlockType.) { if (this.type == BlockType.) {
this.node.parent.getChildByName("Adhesive").opacity = 255; this.adhesiveNode.forEach(child => {
child.opacity = 255;
});
} }
if (this.block_Info.flowerSend != undefined) { if (this.block_Info.flowerSend != undefined) {
this.flowerType = 1; this.flowerType = 1;

View File

@ -1480,6 +1480,7 @@ export default class MapConroler extends cc.Component {
.start(); .start();
//真我 Neo8
} }
//创建旋转门设置功能 //创建旋转门设置功能
@ -5055,14 +5056,12 @@ export default class MapConroler extends cc.Component {
} }
// console.log("初步判断 游戏结束结果", result); // console.log("初步判断 游戏结束结果", result);
//如果变色门是打开状态,且当前颜色是最后一个颜色,那么游戏结束 //如果变色门是打开状态,且当前颜色是最后一个颜色,那么游戏结束
if (openResult != 1 && this.changeColor == true && this.longAndShortWall.length == 0) { // if (openResult != 1 && this.changeColor == true && this.longAndShortWall.length == 0) {
result = true; // result = true;
} // }
// console.log("提前判输结果", result); // console.log("提前判输结果", result);
if (result == true) {
this.propCanbeUse = false; //是否能使用道具
}
return result; return result;
} }

View File

@ -133,6 +133,7 @@ export default class Wall extends cc.Component {
colorArray: any; colorArray: any;
colorStartArray: any; colorStartArray: any;
colorLength: number = 0; // 颜色数组的长度 colorLength: number = 0; // 颜色数组的长度
realLength: number = 0; // 门的真实实时长度
longAndShort: number[] = []; // 长短变化的门 longAndShort: number[] = []; // 长短变化的门
order: boolean = true; // 顺序门 order: boolean = true; // 顺序门
length: number = 0; // 门的长度 length: number = 0; // 门的长度
@ -189,6 +190,7 @@ export default class Wall extends cc.Component {
// console.log(this.posX,this.posY,this.node.zIndex); // console.log(this.posX,this.posY,this.node.zIndex);
//this.node.getChildByName("num").getComponent(cc.Label).string = direction; //this.node.getChildByName("num").getComponent(cc.Label).string = direction;
//this.node.getChildByName("num").getComponent(cc.Label).string = ":" + this.node.parent.zIndex; //this.node.getChildByName("num").getComponent(cc.Label).string = ":" + this.node.parent.zIndex;
} }
if (wall_Info != null) { if (wall_Info != null) {
this.specialBackup = 0; this.specialBackup = 0;
@ -202,6 +204,7 @@ export default class Wall extends cc.Component {
} }
this.num = this.wall_Info.num; this.num = this.wall_Info.num;
this.length = this.wall_Info.length; this.length = this.wall_Info.length;
this.realLength = this.wall_Info.length;
let name2 = "rotate" + this.wall_Info.length; let name2 = "rotate" + this.wall_Info.length;
this.revolvingNode = this.node.parent.getChildByName("revolving").getChildByName(name2); this.revolvingNode = this.node.parent.getChildByName("revolving").getChildByName(name2);
//跳跃门 //跳跃门
@ -762,6 +765,7 @@ export default class Wall extends cc.Component {
this.setMaskPosition(); this.setMaskPosition();
} }
setMaskPosition() { setMaskPosition() {
if (this.node.parent.name == "down") { if (this.node.parent.name == "down") {
if (this.wall_Info.length == 3) { if (this.wall_Info.length == 3) {
@ -933,6 +937,7 @@ export default class Wall extends cc.Component {
//顺向的, 在第一个。 //顺向的, 在第一个。
// console.log("执行:", this.longAndShort[0], this.longAndShort[1]); // console.log("执行:", this.longAndShort[0], this.longAndShort[1]);
this.length = this.longAndShort[0]; this.length = this.longAndShort[0];
this.realLength = this.length;
if (type == 0) { if (type == 0) {
// this.length = this.longAndShort[0]; // this.length = this.longAndShort[0];
// console.log(this.wall_Info.num, "实际长度:", this.length, "本身长度:", this.wall_Info.length); // console.log(this.wall_Info.num, "实际长度:", this.length, "本身长度:", this.wall_Info.length);

View File

@ -37,7 +37,7 @@ export default class ItemRender extends cc.Component {
let endlessNode = this.node.getChildByName("endlessNode"); let endlessNode = this.node.getChildByName("endlessNode");
endlessNode.active = true; endlessNode.active = true;
NumberToImage.numberToImageNodes5(this.data.endLevelNum - 1, 30, 15, "Black", endlessNode.getChildByName("levelNum"), true); NumberToImage.numberToImageNodes5(this.data.endLevelNum - 1, 30, 15, "Black", endlessNode.getChildByName("levelNum"), true);
if ((this.data.endLevelNum - 1) > 9000) { if ((this.data.endLevelNum - 1) > 9999) {
endlessNode.getChildByName("nomal").active = false; endlessNode.getChildByName("nomal").active = false;
endlessNode.getChildByName("one").active = true; endlessNode.getChildByName("one").active = true;
endlessNode.getChildByName("two").active = false; endlessNode.getChildByName("two").active = false;

View File

@ -436,15 +436,6 @@ var GameTool = {
callBack(data); callBack(data);
} }
}, isWuxian) }, isWuxian)
//招行 6144 +2950 = 9100
//京东 31000
//花呗 12800
//抖音 12800
//美团 300
//微粒贷 19000
//招行 250000
}, },
//关卡上限 //关卡上限