Commit 62894aa3 authored by wildfirecode's avatar wildfirecode

Merge branch 'master' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole

parents e312e733 af59f284
...@@ -2438,23 +2438,23 @@ export default class MainScene extends Scene { ...@@ -2438,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.readyCannoArr.length;p++){ // for(var p=0;p<this.readyCannoArr.length;p++){
var preadyCannoIdx = this.readyCannoArr[p]; // var preadyCannoIdx = this.readyCannoArr[p];
var pemitcanno = this.cannoArr[preadyCannoIdx].ele; // var pemitcanno = this.cannoArr[preadyCannoIdx].ele;
this.fireCanno(pemitcanno); // this.fireCanno(pemitcanno);
} // }
return; // return;
} }
// if(emitcanno){ if(emitcanno){
// this.fireCanno(emitcanno); this.fireCanno(emitcanno);
// return; return;
// } }
if (this._converyorTag) { if (this._converyorTag) {
...@@ -2662,18 +2662,24 @@ export default class MainScene extends Scene { ...@@ -2662,18 +2662,24 @@ export default class MainScene extends Scene {
* 炮台发射完毕,开始炮台消除 * 炮台发射完毕,开始炮台消除
*/ */
callBackFireCanno(canno:Element){ callBackFireCanno(canno:Element){
if(this.readyCannoArr.length==1){ this.eliminate();
this.eliminate(); this.readyCannoArr.shift();
}
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;
}
}
canno.resetCannoStat(); 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() { checkAllBlock() {
// this.lattices.filter(item => item.block).forEach((item) => { // this.lattices.filter(item => item.block).forEach((item) => {
...@@ -3396,7 +3402,7 @@ export default class MainScene extends Scene { ...@@ -3396,7 +3402,7 @@ export default class MainScene extends Scene {
//新大炮充能 //新大炮充能
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 canaddver = this.addCannoStatByHor(np,lat.row,col); var canaddver = this.addCannoStatByVer(np,lat.row,col);
if(canaddver){ if(canaddver){
npdata.ineffect = true; 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