更新最新
This commit is contained in:
parent
e4920a2a18
commit
0f72616e7a
|
|
@ -174,6 +174,7 @@ export default class Block extends cc.Component {
|
|||
pz: boolean = false;
|
||||
over: boolean = false; //方块是否失效已消失
|
||||
moveFloorPd: boolean = false; //是否可移动地板块移动
|
||||
adhesiveArray: any[]; //粘合方块数组
|
||||
collider: any;
|
||||
block_Info: any;
|
||||
_touchListener: any;
|
||||
|
|
@ -203,6 +204,7 @@ export default class Block extends cc.Component {
|
|||
this.adhesiveNode = [];
|
||||
this.teamBlocks = [];
|
||||
this.colorArray = [];
|
||||
this.adhesiveArray = [];
|
||||
this.moveFloorPd = false;
|
||||
this.colorNode = null;
|
||||
this.collider = this.node.getComponent(cc.PolygonCollider);
|
||||
|
|
@ -313,7 +315,6 @@ export default class Block extends cc.Component {
|
|||
if (block_Info.flowerReceive) {
|
||||
MapConroler._instance.flowerBlock.push(this);
|
||||
this.flowerType = 2;
|
||||
this.node.parent.getChildByName("Adhesive").opacity = 0;
|
||||
}
|
||||
if (this.flowerType != 0) {
|
||||
this.createFlower();
|
||||
|
|
@ -565,7 +566,7 @@ export default class Block extends cc.Component {
|
|||
name = "0color" + this.block_Info.block;
|
||||
number = 5;
|
||||
}
|
||||
console.log("本身颜色", name);
|
||||
// console.log("本身颜色", name);
|
||||
let change_color = this.colorArray[0];
|
||||
if (this.colorArray.length > 1)
|
||||
change_color = this.colorArray[1];
|
||||
|
|
@ -574,7 +575,7 @@ export default class Block extends cc.Component {
|
|||
|
||||
|
||||
var spriteFrame2 = this.flower_SpriteFrame._spriteFrames[name2];
|
||||
console.log("下一个颜色", name2);
|
||||
// console.log("下一个颜色", name2);
|
||||
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]);
|
||||
}
|
||||
|
||||
|
|
@ -693,8 +707,9 @@ export default class Block extends cc.Component {
|
|||
addAdhesive(diraction, box) {
|
||||
let pos = cc.v2(box.x - this.posX, box.y - this.posY);
|
||||
let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[10]);
|
||||
|
||||
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);
|
||||
if (diraction == "left" || diraction == "right") {
|
||||
adhesive.getChildByName("heng").active = true;
|
||||
|
|
@ -903,7 +918,10 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
else if (this.type == BlockType.变色块) {
|
||||
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 {
|
||||
|
|
@ -1363,7 +1381,10 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
else if (this.type == BlockType.变色块) {
|
||||
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);
|
||||
|
|
@ -1535,7 +1556,10 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
else if (this.type == BlockType.变色块) {
|
||||
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;
|
||||
|
|
@ -2818,7 +2842,9 @@ export default class Block extends cc.Component {
|
|||
this.flowerType = 0;
|
||||
this.resetFloor();
|
||||
if (this.type == BlockType.粘合块) {
|
||||
this.node.parent.getChildByName("Adhesive").opacity = 255;
|
||||
this.adhesiveNode.forEach(child => {
|
||||
child.opacity = 255;
|
||||
});
|
||||
}
|
||||
if (this.block_Info.flowerSend != undefined) {
|
||||
this.flowerType = 1;
|
||||
|
|
|
|||
|
|
@ -1480,6 +1480,7 @@ export default class MapConroler extends cc.Component {
|
|||
.start();
|
||||
|
||||
|
||||
//真我 Neo8
|
||||
}
|
||||
|
||||
//创建旋转门设置功能
|
||||
|
|
@ -5055,14 +5056,12 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
// console.log("初步判断 游戏结束结果", result);
|
||||
//如果变色门是打开状态,且当前颜色是最后一个颜色,那么游戏结束
|
||||
if (openResult != 1 && this.changeColor == true && this.longAndShortWall.length == 0) {
|
||||
result = true;
|
||||
}
|
||||
// if (openResult != 1 && this.changeColor == true && this.longAndShortWall.length == 0) {
|
||||
// result = true;
|
||||
// }
|
||||
|
||||
// console.log("提前判输结果", result);
|
||||
if (result == true) {
|
||||
this.propCanbeUse = false; //是否能使用道具
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ export default class Wall extends cc.Component {
|
|||
colorArray: any;
|
||||
colorStartArray: any;
|
||||
colorLength: number = 0; // 颜色数组的长度
|
||||
realLength: number = 0; // 门的真实实时长度
|
||||
longAndShort: number[] = []; // 长短变化的门
|
||||
order: boolean = true; // 顺序门
|
||||
length: number = 0; // 门的长度
|
||||
|
|
@ -189,6 +190,7 @@ export default class Wall extends cc.Component {
|
|||
// 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 = ":" + this.node.parent.zIndex;
|
||||
|
||||
}
|
||||
if (wall_Info != null) {
|
||||
this.specialBackup = 0;
|
||||
|
|
@ -202,6 +204,7 @@ export default class Wall extends cc.Component {
|
|||
}
|
||||
this.num = this.wall_Info.num;
|
||||
this.length = this.wall_Info.length;
|
||||
this.realLength = this.wall_Info.length;
|
||||
let name2 = "rotate" + this.wall_Info.length;
|
||||
this.revolvingNode = this.node.parent.getChildByName("revolving").getChildByName(name2);
|
||||
//跳跃门
|
||||
|
|
@ -762,6 +765,7 @@ export default class Wall extends cc.Component {
|
|||
this.setMaskPosition();
|
||||
}
|
||||
|
||||
|
||||
setMaskPosition() {
|
||||
if (this.node.parent.name == "down") {
|
||||
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]);
|
||||
this.length = this.longAndShort[0];
|
||||
this.realLength = this.length;
|
||||
if (type == 0) {
|
||||
// this.length = this.longAndShort[0];
|
||||
// console.log(this.wall_Info.num, "实际长度:", this.length, "本身长度:", this.wall_Info.length);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default class ItemRender extends cc.Component {
|
|||
let endlessNode = this.node.getChildByName("endlessNode");
|
||||
endlessNode.active = 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("one").active = true;
|
||||
endlessNode.getChildByName("two").active = false;
|
||||
|
|
|
|||
|
|
@ -436,15 +436,6 @@ var GameTool = {
|
|||
callBack(data);
|
||||
}
|
||||
}, isWuxian)
|
||||
|
||||
//招行 6144 +2950 = 9100
|
||||
//京东 31000
|
||||
//花呗 12800
|
||||
//抖音 12800
|
||||
//美团 300
|
||||
//微粒贷 19000
|
||||
//招行 250000
|
||||
|
||||
},
|
||||
|
||||
//关卡上限
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user