Commit 8fae03ac authored by wildfirecode's avatar wildfirecode

1

parent 77331f5c
......@@ -627,7 +627,7 @@ export default class MainScene extends Scene {
} else if (isSand(latticesD[i])) {
latticeDisplay = getSandDisplayBlock();
this.lattices[i].sand = latticeDisplay as Sand;
} else if (isBlock(latticesD[i])) {
} else {
latticeDisplay = genBlockDisplay(latticesD[i]);
this.lattices[i].block = latticeDisplay as BaseBlock;
}
......@@ -2051,7 +2051,12 @@ export default class MainScene extends Scene {
return;
};
//消除结束之后检查石门
await this.checkAllBlock();
const blockResult = await this.checkAllBlock();
if (blockResult && blockResult.length && blockResult.some(item => item)) {
console.log('有至少一个门翻转过来了', blockResult);
this.eliminate();
return;
}
//检查糖果
const candyResult = await this.checkAllCandy();
if (candyResult) {//是不是有融化了的
......@@ -3086,7 +3091,7 @@ export default class MainScene extends Scene {
lat.sand = null;
const p = Tool.getPositionByIndex(lat.index);
// this.playAni(RecoverName.SAND_ANI, p);
createSandDisAni(p[0],p[1],this)
createSandDisAni(p[0], p[1], this)
}
}
......
......@@ -50,6 +50,8 @@ const judgeActionIndex = (index: number, lattices: Lattice[]): number => {
!lattices[i].element.hasAnyState() &&
!lattices[i].element.candy &&
!lattices[i].sand &&
!lattices[i].block &&
!lattices[i].ice &&
!lattices[i].element.monster
) {
return i
......
......@@ -2,6 +2,7 @@ import { getEffectFramesStr } from "../../../effect/createEffect1";
import MovieClip from "../../../movieclip/MovieClip";
export const createCandySubAni = (x,y,p) => {
if(!p)return;
const spritesheet = RES.getRes('candysub_json');
if(!spritesheet)return;
const list = getEffectFramesStr('数字减少星星_000', 0, 15);
......
......@@ -64,11 +64,12 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
private _state = -1;
private _changing = false;
async nextState(first = false) {
//先改数据再改视图
const isState2 = this._state == 2;
this._state++;
if (this._state > 5)
this._state = 0;
await this.changeState(first);
return isState2;
}
private updateElementState() {
......
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