Commit 13da983c authored by zjz1994's avatar zjz1994

特效充能暂存

parent 722fd25f
...@@ -2383,7 +2383,7 @@ export default class MainScene extends Scene { ...@@ -2383,7 +2383,7 @@ export default class MainScene extends Scene {
}, 200) }, 200)
} else { } else {
//新大炮充能 //新大炮充能
console.log("新炮台充能",JSON.parse(JSON.stringify(pcannostatArr))); // console.log("新炮台充能",JSON.parse(JSON.stringify(pcannostatArr)));
for(var np=0;np<pcannostatArr.length;np++){ for(var np=0;np<pcannostatArr.length;np++){
var npdata = pcannostatArr[np]; var npdata = pcannostatArr[np];
var npineffect = npdata.ineffect; var npineffect = npdata.ineffect;
...@@ -2392,7 +2392,11 @@ export default class MainScene extends Scene { ...@@ -2392,7 +2392,11 @@ export default class MainScene extends Scene {
if(npineffect){ if(npineffect){
npadd = 1; npadd = 1;
}else{ }else{
npadd = npaddnum; if(npaddnum>2){
npadd = npaddnum;
}else{
npadd = npaddnum;
}
} }
var npcanno = this.cannoArr[np].ele; var npcanno = this.cannoArr[np].ele;
// console.log("新炮台充能",np,npadd) // console.log("新炮台充能",np,npadd)
...@@ -2434,23 +2438,23 @@ export default class MainScene extends Scene { ...@@ -2434,23 +2438,23 @@ export default class MainScene extends Scene {
} }
//炮台充能发射 //炮台充能发射
var emitcanno:Element; // var emitcanno:Element;
if(this.readyCannoArr.length>0){ if(this.readyCannoArr.length>0){
var readyCannoIdx = this.readyCannoArr[0]; // var readyCannoIdx = this.readyCannoArr[0];
emitcanno = this.cannoArr[readyCannoIdx].ele; // emitcanno = this.cannoArr[readyCannoIdx].ele;
}
// for(var p=0;p<this.cannoArr.length;p++){ for(var p=0;p<this.readyCannoArr.length;p++){
// var pcanno = this.cannoArr[p].ele; var preadyCannoIdx = this.readyCannoArr[p];
// var pcannostat = pcanno.checkCannoStat(); var pemitcanno = this.cannoArr[preadyCannoIdx].ele;
// if(pcannostat){ this.fireCanno(pemitcanno);
// emitcanno = pcanno; }
// break;
// }
// }
if(emitcanno){
this.fireCanno(emitcanno);
return; return;
} }
// if(emitcanno){
// this.fireCanno(emitcanno);
// return;
// }
if (this._converyorTag) { if (this._converyorTag) {
...@@ -2658,8 +2662,17 @@ export default class MainScene extends Scene { ...@@ -2658,8 +2662,17 @@ export default class MainScene extends Scene {
* 炮台发射完毕,开始炮台消除 * 炮台发射完毕,开始炮台消除
*/ */
callBackFireCanno(canno:Element){ callBackFireCanno(canno:Element){
this.eliminate(); var cannoidx = canno.index;
this.readyCannoArr.shift(); for(var i=0;i<this.readyCannoArr.length;i++){
var ireadycannoidx = this.cannoArr[this.readyCannoArr[i]].idx;
if(ireadycannoidx==cannoidx){
this.readyCannoArr.splice(i,1);
break;
}
}
if(this.readyCannoArr.length==0){
this.eliminate();
}
canno.resetCannoStat(); canno.resetCannoStat();
} }
checkAllBlock() { checkAllBlock() {
......
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