Commit 62894aa3 authored by wildfirecode's avatar wildfirecode

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

parents e312e733 af59f284
......@@ -2438,24 +2438,24 @@ 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);
// 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) {
await doConveyorAI(this);
......@@ -2662,18 +2662,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.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) => {
......@@ -3396,7 +3402,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