Commit bc8c74a6 authored by zjz1994's avatar zjz1994

Merge branch 'hotfix20200331' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents d873950a af59f284
......@@ -2450,23 +2450,23 @@ export default class MainScene extends Scene {
}
//炮台充能发射
// var emitcanno:Element;
var emitcanno:Element;
if(this.readyCannoArr.length>0){
// var readyCannoIdx = this.readyCannoArr[0];
// emitcanno = this.cannoArr[readyCannoIdx].ele;
var readyCannoIdx = this.readyCannoArr[0];
emitcanno = this.cannoArr[readyCannoIdx].ele;
for(var p=0;p<this.readyCannoArr.length;p++){
var preadyCannoIdx = this.readyCannoArr[p];
var pemitcanno = this.cannoArr[preadyCannoIdx].ele;
this.fireCanno(pemitcanno);
}
return;
// for(var p=0;p<this.readyCannoArr.length;p++){
// var preadyCannoIdx = this.readyCannoArr[p];
// var pemitcanno = this.cannoArr[preadyCannoIdx].ele;
// this.fireCanno(pemitcanno);
// }
// return;
}
// if(emitcanno){
// this.fireCanno(emitcanno);
// return;
// }
if(emitcanno){
this.fireCanno(emitcanno);
return;
}
if (this._converyorTag) {
......@@ -2677,18 +2677,24 @@ export default class MainScene extends Scene {
* 炮台发射完毕,开始炮台消除
*/
callBackFireCanno(canno:Element){
if(this.readyCannoArr.length==1){
this.eliminate();
}
var cannoidx = canno.index;
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;
}
}
this.eliminate();
this.readyCannoArr.shift();
canno.resetCannoStat();
// if(this.readyCannoArr.length==1){
// this.eliminate();
// }
// let cannoidx = canno.index;
// // setTimeout(()=>{
// for(let i=0;i<this.readyCannoArr.length;i++){
// let ireadycannoidx = this.cannoArr[this.readyCannoArr[i]].idx;
// if(ireadycannoidx==cannoidx){
// this.readyCannoArr.splice(i,1);
// break;
// }
// }
// canno.resetCannoStat();
// // },150)
}
checkAllBlock() {
// this.lattices.filter(item => item.block).forEach((item) => {
......@@ -3408,7 +3414,7 @@ export default class MainScene extends Scene {
//新大炮充能
for(var np=0;np<pcannostatArr.length;np++){
var npdata = pcannostatArr[np];
var canaddver = this.addCannoStatByHor(np,lat.row,col);
var canaddver = this.addCannoStatByVer(np,lat.row,col);
if(canaddver){
npdata.ineffect = true;
}
......
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