Commit 02d4da10 authored by zjz1994's avatar zjz1994

解决关卡过关卡住,烟花的bug

parent 85cc4884
...@@ -682,7 +682,6 @@ export default class MainScene extends Scene { ...@@ -682,7 +682,6 @@ export default class MainScene extends Scene {
mvdata = cannolightmvdata; mvdata = cannolightmvdata;
mv = Pool.takeOut(RecoverName.CANNOLIGHT); mv = Pool.takeOut(RecoverName.CANNOLIGHT);
}else if(jsvgname=="cannoparticle"){ }else if(jsvgname=="cannoparticle"){
console.error("新特效大炮不再使用particle");
mvdata = cannoparticlemvdata; mvdata = cannoparticlemvdata;
} }
if(mvdata){ if(mvdata){
...@@ -2907,11 +2906,12 @@ export default class MainScene extends Scene { ...@@ -2907,11 +2906,12 @@ export default class MainScene extends Scene {
}, 200) }, 200)
} }
} }
incheckFall:boolean = false;
/** /**
* 掉落完后的操作 * 掉落完后的操作
*/ */
async fallCallback() { async fallCallback() {
this.incheckFall = true;
// //掉落后先走猩猩的消除 // //掉落后先走猩猩的消除
// if(this.gopongoArr.length>0){//消除猩猩,先播放猩猩消失的动画,后消除 // if(this.gopongoArr.length>0){//消除猩猩,先播放猩猩消失的动画,后消除
// for(var cp=0;cp<this.gopongoArr.length;cp++){ // for(var cp=0;cp<this.gopongoArr.length;cp++){
...@@ -3467,7 +3467,7 @@ export default class MainScene extends Scene { ...@@ -3467,7 +3467,7 @@ export default class MainScene extends Scene {
let inidx = this.wormFireworks.indexOf(idx); let inidx = this.wormFireworks.indexOf(idx);
if(inidx!=-1){ if(inidx!=-1){
this.wormFireworks.splice(inidx,1); this.wormFireworks.splice(inidx,1);
if(this.wormFireworks.length==0){ if(this.wormFireworks.length==0&&this._checkMtag.wormhole&&!this.incheckFall){
console.log("黑洞上的烟花播放完毕"); console.log("黑洞上的烟花播放完毕");
this.aiMotionCheckDieMap(); this.aiMotionCheckDieMap();
} }
...@@ -3477,22 +3477,25 @@ export default class MainScene extends Scene { ...@@ -3477,22 +3477,25 @@ export default class MainScene extends Scene {
* 果冻蔓延和气泡变色需要重新检查死图 * 果冻蔓延和气泡变色需要重新检查死图
*/ */
async aiMotionCheckDieMap() { async aiMotionCheckDieMap() {
console.log("重置点击"); console.log("重置点击验证");
this.incheckFall = false;
//黑洞转移 //黑洞转移
if(this._checkMtag.wormhole){ if(this._checkMtag.wormhole){
let wormholes = this.chapterData.map.WORMHOLE; let wormholes = this.chapterData.map.WORMHOLE;
if(wormholes&&wormholes.length>0){ if(wormholes&&wormholes.length>0){
console.log("虫洞位移检测",this.wormHolePromise.length); console.log("虫洞位移检测",this.wormHolePromise.length);
if(this.wormFireworks.length>0){
return console.error("等待烟花放完");
}
this._checkMtag.wormhole = false;
await Promise.all(this.wormHolePromise).then(()=>{ await Promise.all(this.wormHolePromise).then(()=>{
console.log("动画完毕"); console.log("动画完毕");
}); });
if(this.wormFireworks.length>0){
return console.error("等待烟花放完");
}
console.log("开始黑洞转移"); console.log("开始黑洞转移");
await doWormHoleAI(this); await doWormHoleAI(this);
this._checkMtag.wormhole = false;
// console.log("黑洞转移完毕"); // console.log("黑洞转移完毕");
//黑洞转移,使黑洞占位变空,需要添加到emptys中, //黑洞转移,使黑洞占位变空,需要添加到emptys中,
...@@ -4116,6 +4119,7 @@ export default class MainScene extends Scene { ...@@ -4116,6 +4119,7 @@ export default class MainScene extends Scene {
var index = effectIndexs[j]; var index = effectIndexs[j];
var lat: Lattice = this.lattices[index]; var lat: Lattice = this.lattices[index];
let ele = lat.element; let ele = lat.element;
if(!ele)continue;
var p = Tool.getPositionByIndex(index); var p = Tool.getPositionByIndex(index);
switch(ele.effectType) { switch(ele.effectType) {
case EffectType.MAGICLION: case EffectType.MAGICLION:
...@@ -4346,7 +4350,7 @@ export default class MainScene extends Scene { ...@@ -4346,7 +4350,7 @@ export default class MainScene extends Scene {
var effectElements = [], elements = []; var effectElements = [], elements = [];
for(var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) { for(var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) {
var lat = this.lattices[i]; var lat = this.lattices[i];
if(Tool.judgeBaseEle(lat)) { if(Tool.judgeBaseEle(lat)&&!lat.element.hasState(StateType.BLOCK_LOCK)) {
if(lat.element.effectType != null) { if(lat.element.effectType != null) {
effectElements.push(i); effectElements.push(i);
} else { } else {
...@@ -4356,6 +4360,7 @@ export default class MainScene extends Scene { ...@@ -4356,6 +4360,7 @@ export default class MainScene extends Scene {
} }
//如果特效有,消除特效 //如果特效有,消除特效
if(effectElements.length) { if(effectElements.length) {
console.log("结算检测---------------------有需要特效消除",JSON.stringify(effectElements));
Array.prototype.push.apply(this.eliminatedElements, effectElements); Array.prototype.push.apply(this.eliminatedElements, effectElements);
this.eliminate(); this.eliminate();
} else { } else {
...@@ -4368,6 +4373,7 @@ export default class MainScene extends Scene { ...@@ -4368,6 +4373,7 @@ export default class MainScene extends Scene {
this.submit(json) this.submit(json)
return return
} }
console.log("结算检测-------------------结算飞星");
this.isCountingTime = true; this.isCountingTime = true;
let countAll = Math.min(this.steps, elements.length); let countAll = Math.min(this.steps, elements.length);
let count = 0; let count = 0;
...@@ -5697,7 +5703,7 @@ export default class MainScene extends Scene { ...@@ -5697,7 +5703,7 @@ export default class MainScene extends Scene {
onewormlight = new window["SVGA"].EgretMovieClip(wormlightdata); onewormlight = new window["SVGA"].EgretMovieClip(wormlightdata);
} }
this.effectContainer.addChild(onewormlight); this.effectContainer.addChild(onewormlight);
console.log(onewormlight); // console.log(onewormlight);
onewormlight.x = posx-41; onewormlight.x = posx-41;
onewormlight.y = posy-41; onewormlight.y = posy-41;
......
...@@ -187,39 +187,59 @@ export const Chapters26: ChapterData[] = [ ...@@ -187,39 +187,59 @@ export const Chapters26: ChapterData[] = [
], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 36, type: null }, { index: 44, type: null } ] } }, ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 36, type: null }, { index: 44, type: null } ] } },
//672 //672
{ baseElementTypes: [ 1, 2, 0, 4 ], bubbleProbability: 0, { baseElementTypes: [ 1, 2, 0, 4 ], bubbleProbability: 0, stepCount: 27, passTarget: { type: 1, elements: [ { type: 22, count: 25 }, { type: 24, count: 25 }, { type: 26, count: 25 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 4, 4, 1, 41, 41, 41, 1, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 1, 4, 4 ], connectedLats: [ [ 31, 49 ] ], conveyor: [], conveyorConnectedLats: [], WORMHOLE: [ [ 37, 38 ], [ 42, 43 ] ], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 13, 13, 13, 13, 13, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 5, 2, 2, 2, 2, 2, 2, 2, 5, 1, 1, 2, 2, 2, 2, 2, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } },
stepCount: 27, passTarget: { type: 1, elements: [ { type: 22, count: 25 }, { type: 24, count: 25 }, { type: 26, count: 25 } ] }, starScores: [ 15000, 20000, 25000 ], map: { //654
lattices: [ { baseElementTypes: [ 0, 1, 2, 3 ], bubbleProbability: 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, stepCount: 23, passTarget: { type: 1, elements: [
1, 1, 1, 1, 1, 1, 1, 1, 1, { type: 1, count: 5 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1, 4, 1, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1, 4, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1, 4, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 41, 1, 4,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1 ], connectedLats: [ [ 31, 49 ] ], conveyor: [], conveyorConnectedLats: [], 1, 1, 1, 1, 1, 1, 1, 1, 1,
WORMHOLE: [ [ 37, 38 ], [ 42, 43 ] ], 0, 1, 1, 1, 1, 1, 1, 1, 1,
elements: [ 0, 0, 1, 1, 1, 1, 1, 1, 1 ], connectedLats: [ [19,37] ,[44,62]], conveyor: [ [ 2, 20 ], [ 29, 30 ], [ 39, 40 ], [ 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, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 16, type: null }, { index: 26, type: null }, { index: 36, type: null } ] } },
0, 0, 0, 0, 0, 0, 0, 0, 0
], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } },
{ baseElementTypes: [ 3, 4, 1, 2 ], bubbleProbability: 0, stepCount: 20, passTarget: { type: 1, elements: [ { type: 9, count: 49 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [
0, 0, 0, 3, 0, 2, 0, 0, 0,
0, 3, 3, 3, 3, 0, 0, 3, 0,
0, 0, 3, 3, 3, 3, 3, 3, 0,
2, 0, 3, 3, 3, 3, 3, 3, 3,
0, 3, 3, 3, 3, 3, 3, 3, 0,
3, 3, 3, 3, 3, 3, 3, 0, 2,
0, 3, 3, 3, 3, 3, 3, 0, 0,
0, 3, 0, 0, 3, 3, 3, 3, 0,
0, 0, 0, 2, 0, 3, 0, 0, 0 ], connectedLats: [], conveyor: [], conveyorConnectedLats: [], WORMHOLE: [], elements: [
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 11, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 3, type: null }, { index: 5, type: null }, { index: 10, type: null }, { index: 11, type: null }, { index: 13, type: null }, { index: 16, type: null }, { index: 24, type: null }, { index: 27, type: null }, { index: 35, type: null } ] } },
] ]
...@@ -129,7 +129,7 @@ export class Element extends eui.Component { ...@@ -129,7 +129,7 @@ export class Element extends eui.Component {
if (this._fireworks.currentFrame == end) { //向上吹 if (this._fireworks.currentFrame == end) { //向上吹
this._fireworks.gotoAndStop(start); this._fireworks.gotoAndStop(start);
this._fireworks.removeEventListener(egret.Event.ENTER_FRAME, cb, this); this._fireworks.removeEventListener(egret.Event.ENTER_FRAME, cb, this);
console.error("释放烟花pro",this.index); // console.error("释放烟花pro",this.index);
this.mainScene.checkFireWorks(this.index); this.mainScene.checkFireWorks(this.index);
resolve(); resolve();
} }
...@@ -983,6 +983,7 @@ export class Element extends eui.Component { ...@@ -983,6 +983,7 @@ export class Element extends eui.Component {
* @param type 只应该是基础元素和特殊元素 * @param type 只应该是基础元素和特殊元素
*/ */
reset(type: ElementType) { reset(type: ElementType) {
this.effectType = null;
this._isMonsterJelly=false; this._isMonsterJelly=false;
this._isNeb = false; this._isNeb = false;
this.alpha = this.scaleX = this.scaleY = 1; this.alpha = this.scaleX = this.scaleY = 1;
......
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