Commit 986a796d authored by zjz1994's avatar zjz1994

通关目标暂存

parent 7d3afc3f
......@@ -19,5 +19,6 @@
<e:Image id="icon26" width="70" height="70" source="startpanel_ele26_png"/>
<e:Image id="icon34" width="70" height="70" source="startpanel_ele34_png"/>
<e:Image id="icon36" width="70" height="70" source="startpanel_ele36_png"/>
<e:Image id="icon41" width="70" height="70" source="ele41_png"/>
<e:BitmapLabel id="txt" text="0" font="nums4_fnt" verticalCenter="20.5" x="73.2" scaleX="0.85" scaleY="0.85"/>
</e:Skin>
\ No newline at end of file
......@@ -3215,6 +3215,7 @@ export default class MainScene extends Scene {
}
//如果只有步数转化的,不能再进结算,
else {
return;
//通关了
//提交分数等
// console.log("结算检测---------------------弹窗检测4");
......@@ -4288,6 +4289,7 @@ export default class MainScene extends Scene {
if(!ele)continue;
var p = Tool.getPositionByIndex(index);
var canturgrass = this.judgeTurfing(index);
console.log("特效传播草坪",canturgrass);
var grassArr = new Array();
var turfCp = new Array();
switch(ele.effectType) {
......@@ -4513,9 +4515,11 @@ export default class MainScene extends Scene {
break;
}
if(grassArr.length>0){
console.log("特效传播草坪",JSON.stringify(grassArr));
this.changeGroGrass(grassArr);
}
if(turfCp.length>0){
console.log("炮台猩猩草坪",JSON.stringify(turfCp))
this.changeGroGrassCp(turfCp);
}
}
......@@ -4565,7 +4569,7 @@ export default class MainScene extends Scene {
}
//如果特效有,消除特效
if(effectElements.length) {
// console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements));
console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements));
Array.prototype.push.apply(this.eliminatedElements, effectElements);
this.eliminate();
} else {
......@@ -5669,12 +5673,18 @@ export default class MainScene extends Scene {
Pool.recover(RecoverName.ICE_BLOCK,block);
}else if(lat.block.blocktype==LatticeType.BLOCK_AND_DARK_ICE){
Pool.recover(RecoverName.DARK_ICE_BLOCK,block);
}else if(lat.block.blocktype==LatticeType.BLOCK_AND_GRASS){
Pool.recover(RecoverName.GRASS_BLOCK,block);
}
}else if(lat.sand&&lat.sand.parent){
let sand = lat.sand;
sand.parent.removeChild(sand);
Pool.recover(RecoverName.SAND,sand);
}else if(lat.grass&&lat.grass.parent){
let grass = lat.grass;
grass.parent.removeChild(grass);
Pool.recover(RecoverName.GRASS,grass);
}
}
recoverEleast(lat:Lattice){
......@@ -6077,15 +6087,19 @@ export default class MainScene extends Scene {
grassDisplay = new Grass();
}
lat.grass = grassDisplay;
var passpos:Array<number> = [];
if(lat.block){
lat.block.grass = grassDisplay;
lat.block.addChild(grassDisplay);
passpos = [lat.block.x,lat.block.y];
}else{
this.mapupContainer.addChild(grassDisplay);
var grasspos = Tool.getPositionByIndex(index);
grassDisplay.x = grasspos[0];
grassDisplay.y = grasspos[1];
passpos = [lat.grass.x,lat.grass.y];
}
this.goElementTarget(ElementType.Grass,passpos);
// }
}
}
......
......@@ -155,22 +155,22 @@ export default async (thisObj: MainScene) => {
}
return mapcf;
});
console.log("1传送带检查",list,targetIndexs);
console.log("传送带新增地图元素",mapments);
// console.log("1传送带检查",list,targetIndexs);
// console.log("传送带新增地图元素",mapments);
const elements = list.map(index =>
thisObj.lattices[index].element
);//当前传送带元素
const lattices = list.map(index => thisObj.lattices[index]);//当前的lattices
const targetLattices = targetIndexs.map(index => thisObj.lattices[index]);
console.log("2传送带检查",elements,lattices,targetLattices);
// console.log("2传送带检查",elements,lattices,targetLattices);
mapmentsList.push(mapments);
elementsList.push(elements);
targetLatticesList.push(targetLattices);
latticesList.push(lattices);
targetIndexsList.push(targetIndexs);
console.log("3传送带检查",elementsList,targetLatticesList,latticesList,targetIndexsList);
// console.log("3传送带检查",elementsList,targetLatticesList,latticesList,targetIndexsList);
}
console.log("4传送带检查",listItems);
// console.log("4传送带检查",listItems);
listItems.forEach(item => thisObj.conveyorMap[item] = null);
latticesList.forEach(lattices => {
lattices.forEach(lat => lat.element = null);
......
......@@ -42,7 +42,7 @@ export const Chapters28: ChapterData[] = [
//702
{ baseElementTypes: [ 0, 2, 3, 4 ], bubbleProbability: 0, stepCount: 21,
passTarget: { type: 1, elements: [ { type: 9, count: 56 } ] }, starScores: [ 15000, 20000, 25000 ], map: {
passTarget: { type: 1, elements: [ { type: 41, count: 10 } ] }, starScores: [ 15000, 20000, 25000 ], map: {
lattices: [
0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 1, 1, 1, 1, 1, 0, 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment