Commit bcd3fa62 authored by wildfirecode's avatar wildfirecode

1

parent 029d3255
import getResPath from "../libs/new_tc/getResPath";
const parser = new window["SVGA"].Parser();
export const loadSvga = (url: string, parent?: egret.DisplayObjectContainer) => {
......@@ -21,6 +22,35 @@ export const loadSvga = (url: string, parent?: egret.DisplayObjectContainer) =>
});
}
export const initSvga = (videoItem, parent?: egret.DisplayObjectContainer) => {
const mv = new window["SVGA"].EgretMovieClip(videoItem)
mv.gotoAndPlay(1, true)
if (parent)
parent.addChild(mv);
mv.addEventListener(egret.Event.COMPLETE, () => {
// console.log("播放完成")
}, this);
return mv;
}
let fireworksVideoItem;
export const getFireworksVideoItem = () => {
return fireworksVideoItem;
}
export const loadFireworks = () => {
return new Promise((r) => {
const url = getResPath() + 'resource/assets/svgas/fireworks.svga';
parser.load(url, (videoItem) => {
fireworksVideoItem = videoItem;
}, () => {
})
})
};
// export const loadSvga2 = (url: string, parent: egret.DisplayObjectContainer, callback) => {
// return new Promise((resolve, reject) => {
// const parser = new window["SVGA"].Parser();
......
......@@ -769,7 +769,7 @@ export default class MainScene extends Scene {
fireworks.y = p[1];
this.elementContainer.addChild(fireworks);
this.lattices[i].element = fireworks;
fireworks.resetFireworks();
fireworks.resetFireworks(this);
break;
//鸡蛋
case ElementConfigType.CHICKEN_EGG:
......
......@@ -9,7 +9,7 @@ import { GDispatcher } from "../../libs/tc/util/GDispatcher";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import getHomeData, { BLOOD_NUMS_MAX } from "../getHomeData";
import { loadSvga } from "../loadSvga";
import { loadSvga, loadFireworks } from "../loadSvga";
import { getlogItem } from "../Main";
import setGlow from "../setGlow";
import setGray from "../setGray";
......@@ -181,7 +181,7 @@ export default class MapScene extends Scene {
const backData = DataManager.ins.getData('hc_hasBackReward');
if (backData.success) {
backData.success=false;
backData.success = false;
panels.push('BackIndex');
}
......@@ -373,11 +373,14 @@ export default class MapScene extends Scene {
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga');
loadSvga(getResPath() + 'resource/assets/svgas/monster.svga');
// loadSvga(getResPath() + 'resource/assets/svgas/fireworks.svga');
if (!window['development']) {
RES.getResAsync(`inviterulepanel_json`);
}
}, 10*1000);
}, 5 * 1000);
loadFireworks();
this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
}
......
......@@ -64,7 +64,17 @@ export const Chapters14: ChapterData[] = [
//330
{ baseElementTypes: [ 0, 2, 3, 4 ], bubbleProbability: 0, stepCount: 25, passTarget: { type: 1, elements: [ { type: 1, count: 299 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1 ], connectedLats: [], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 21, type: null }, { index: 22, type: null }, { index: 23, type: null }, { index: 37, type: null }, { index: 43, type: null }, { index: 54, type: null }, { index: 55, type: null }, { index: 61, type: null }, { index: 62, type: null } ] } },
//331
{ baseElementTypes: [ 0, 2, 3, 4 ], bubbleProbability: 0, stepCount: 27, passTarget: { type: 1, elements: [ { type: 22, count: 30 }, { type: 24, count: 30 }, { type: 25, count: 30 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], connectedLats: [], elements: [ 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null } ] } },
{ baseElementTypes: [ 0, 2, 3, 4 ], bubbleProbability: 0, stepCount: 27, passTarget: { type: 1, elements: [ { type: 22, count: 30 }, { type: 24, count: 30 }, { type: 25, count: 30 } ] }, starScores: [ 15000, 20000, 25000 ], map: {
lattices: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], connectedLats: [],
elements: [
13, 1, 1, 1, 1, 1, 1, 1, 13,
13, 1, 1, 1, 1, 1, 1, 1, 13,
13, 1, 1, 1, 1, 1, 1, 1, 13,
1, 1, 1, 1, 1, 1, 1, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4,
1, 1, 1, 1, 1, 1, 1, 1, 1,
13, 1, 1, 1, 1, 1, 1, 1, 13,
13, 1, 1, 1, 1, 1, 1, 1, 13, 13, 1, 1, 1, 1, 1, 1, 1, 13 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null } ] } },
//332
{ baseElementTypes: [ 0, 1, 2, 3, 4 ], bubbleProbability: 0, stepCount: 25, passTarget: { type: 1, elements: [ { type: 9, count: 81 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 61, 3, 3, 3, 3, 3, 3, 6, 61, 3, 61, 6, 3, 3, 3, 3, 3, 3, 61, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ], connectedLats: [], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 4, 1, 2, 1, 2, 5, 2, 5, 1, 5, 2, 5, 2, 2, 4, 5, 4, 5, 4, 5, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } },
//333
......
import getResPath from "../../../libs/new_tc/getResPath";
import { loadSvga } from "../../loadSvga";
import { loadSvga, initSvga, getFireworksVideoItem } from "../../loadSvga";
import { createCandyDie0Ani } from "../anis/candy/createCandyDie0Ani";
import { createCandyDie1Ani } from "../anis/candy/createCandyDie1Ani";
import { createCandyDie2Ani } from "../anis/candy/createCandyDie2Ani";
......@@ -42,8 +42,18 @@ export class Element extends eui.Component {
fire() {
this._fireworksTimer = new Date().getTime();
}
async resetFireworks() {
_fireworks;
async resetFireworks(thisobj) {
this.changeSource('empty_png');
this.showImage.alpha = 0;
const mv: any = initSvga(getFireworksVideoItem());
this._fireworks = mv;
thisobj.addChild(mv);
mv.anchorOffsetX = 340 / 2;
mv.anchorOffsetY = 500;
mv.x = this.x;
mv.y = this.y - 38;
}
_mv;
async resetMonster() {
......
......@@ -1667,226 +1667,6 @@
"levelNum": 331,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 332,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 333,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 334,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 335,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 336,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 337,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 338,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 339,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 340,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 341,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 342,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 343,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 344,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 345,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 346,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 347,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 348,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 349,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 350,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 351,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 352,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 353,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 354,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 355,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 356,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 357,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 358,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 359,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 360,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 361,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 362,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 363,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 364,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 365,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 366,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 367,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 368,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 369,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 370,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 371,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 372,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 373,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 374,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 375,
"maxScore": 47440,
"stars": 1
}
],
"remainProp": [
......
......@@ -1512,6 +1512,381 @@
"levelNum": 300,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 301,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 302,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 303,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 304,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 305,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 306,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 307,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 308,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 309,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 310,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 311,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 312,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 313,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 314,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 315,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 316,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 317,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 318,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 319,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 320,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 321,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 322,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 323,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 324,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 325,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 326,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 327,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 328,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 329,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 330,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 331,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 332,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 333,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 334,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 335,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 336,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 337,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 338,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 339,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 340,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 341,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 342,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 343,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 344,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 345,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 346,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 347,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 348,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 349,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 350,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 351,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 352,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 353,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 354,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 355,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 356,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 357,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 358,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 359,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 360,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 361,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 362,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 363,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 364,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 365,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 366,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 367,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 368,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 369,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 370,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 371,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 372,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 373,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 374,
"maxScore": 47440,
"stars": 1
},
{
"levelNum": 375,
"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