Commit 4971035b authored by wildfirecode's avatar wildfirecode

1

parent 4f99b113
......@@ -60,7 +60,7 @@
<script src="libs/fileSave.js"></script>
<img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;"/>
<script>
window.fresp=0.00001;
window.fresp=990.00001;
// localStorage.clear();
window['testUrl'] = 'http://cuxiaoprexg.m.cnsuning.com/scms/cx521.html?activityId=SL446689024459878400&subactivityId=SUB446689681678090240&businessid=cx521';
window['hbRainTime'] = 30; // 红包雨倒计时
......
......@@ -3,6 +3,7 @@ import { Element } from "../class/Element";
import { StateType } from "../enum/StateType";
export default class BaseBlock extends egret.DisplayObjectContainer {
_inited = false;
constructor(state) {
super();
this._state = state;
......@@ -82,8 +83,9 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
}
playToFrontAni() {
return new Promise((r) => {
const dur = 300;
const dur = this._inited ? 300 : 1;
this._block.visible = true;
this._block.scaleX = 1;
egret.Tween.get(this._block).to({ scaleX: 0 }, dur).call(() => {
......@@ -100,6 +102,7 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
}
egret.Tween.get(this._blockBgFront).to({ scaleX: 1 }, dur).call(() => {
r();
this._inited = true;
})
})
})
......@@ -149,6 +152,7 @@ export default class BaseBlock extends egret.DisplayObjectContainer {
this._blockBgFront.visible = false;
this._blockBgFront.scaleX = 1;
} else {
this._inited = true;
this._block.visible = true;
}
this._blockBgRed.visible = true;
......
......@@ -184,9 +184,9 @@ export class AiControl {
}, 100 * a)
}
loadSvga(getResPath() + 'resource/assets/svgas/雪花炸开效果.svga').then(
(mv:any)=>{
(mv: any) => {
mv.stop();
setTimeout(()=>{
setTimeout(() => {
mv.gotoAndPlay(1, true);
mv.x = p[0] - 350;
mv.y = p[1] - 350;
......@@ -213,14 +213,19 @@ export class AiControl {
thisObj.jellyBrokenMark = false;
//找出所有果冻索引
var indexs: number[] = [];
var blocked: number[] = [];
for (var i = 0; i < thisObj.lattices.length; i++) {
var lattice = thisObj.lattices[i]
//没有格子或没有元素或不是果冻 跳过
if (!lattice || !lattice.element || lattice.element.type != ElementType.JELLY) continue
if (lattice && lattice.element && lattice.block && lattice.block.isLock() && lattice.element.type == ElementType.JELLY ) {
blocked.push(i);
}
if (!lattice || !lattice.element || lattice.element.type != ElementType.JELLY || (lattice.block && lattice.block.isLock())) continue
indexs.push(i);
}
console.log('没有被锁的果冻数量',indexs.length,'被锁果冻数量',blocked.length,)
//如果没有果冻,直接回调
if (!indexs.length) {
if (!indexs.length && blocked.length == 0) {
//标记为无果冻
this.hasJelly = false;
callback();
......
......@@ -1141,106 +1141,6 @@
"levelNum": 227,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 228,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 229,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 230,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 231,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 232,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 233,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 234,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 235,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 236,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 237,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 238,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 239,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 240,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 241,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 242,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 243,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 244,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 245,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 245,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 246,
"maxScore": 47440,
"stars": 1
}
],
"remainProp": [
......
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