Commit f4b7962a authored by zjz1994's avatar zjz1994

猩猩暂存

parent 5a96ef06
......@@ -3943,7 +3943,7 @@ export default class MainScene extends Scene {
let lat = this.lattices[index];
if(lat && lat.element && lat.element.type == ElementType.Pongo) {
const type = ele.type;
if(this.passElements && this.passElements[type] != 0) {
// if(this.passElements && this.passElements[type] != 0) {//不清楚是干啥的
if(lat.element.hasState(StateType.PongoLockState)){
var ilockpongo = {
idx:lat.element.index,
......@@ -3954,7 +3954,7 @@ export default class MainScene extends Scene {
//解锁猩猩被锁状态
lat.element.removePongoLockStat();
}
}
// }
}
}
......@@ -3963,12 +3963,42 @@ export default class MainScene extends Scene {
}
//横纵特效穿过解救猩猩
checkPongoHVEle(row:number,col:number,dir:string){
var lockPongoArr:Array<{idx:number,part:string}> = new Array();
if(dir=="hor"){
//向左穿透猩猩
for(var i=col;i>=0;i++){
this.solveOneTxPgEle(row,col,lockPongoArr);
}
//向右穿透猩猩
for(var i=col;i<Tool.colNum;i++){
}
}else if(dir=="vir"){
}
}
solveOneTxPgEle(row:number,col:number,lockPongoArr:Array<{idx:number,part:string}>){
var eleidx = Tool.rcToIndex(row,col);
if (!this.lattices[eleidx] || !this.lattices[eleidx].element) return 1;
var lat = this.lattices[eleidx];
var iscannoblock = Tool.judgeIscannoBlock(lat);
if(iscannoblock){
return 2;
}
if(lat && lat.element && lat.element.type == ElementType.Pongo) {//是猩猩
if(lat.element.hasState(StateType.PongoLockState)){
var ilockpongo = {
idx:lat.element.index,
part:lat.element.inPongoPart
}
lockPongoArr.push(ilockpongo);
lat.element.removePongoLockStat();
}
}
return 3;
}
solvePongoEle(lockPongoArr:Array<{idx:number,part:string}>){
//对本次解锁的猩猩部分,分成对应的几个猩猩
var alockPongo:Array<number> = [];//只存左上
......
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