Commit 4971035b authored by wildfirecode's avatar wildfirecode

1

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