Commit fb53ec69 authored by wildfirecode's avatar wildfirecode

1

parent 75d8750d
......@@ -3012,7 +3012,12 @@ export default class MainScene extends Scene {
let index = indexs[i];
let lat = this.lattices[index];
if (lat && lat.element && lat.element.type == ElementType.FIREWORKS_SHOOTER) {
console.log(fireworksTypeMap(ele.type));
const type = fireworksTypeMap[ele.type];
if (this.passElements && this.passElements[type] != undefined) {
lat.element.canFire && lat.element.fire();
// this.goElementTarget(type, [this.stage.stageWidth/2, this.stage.stageHeight/2]);
this.goElementTarget(type, [ele.x, ele.y]);
}
}
}
}
......
......@@ -153,11 +153,11 @@ export const Chapters14: ChapterData[] = [
baseElementTypes: [0, 2, 3, 4], bubbleProbability: 0, stepCount: 26,
passTarget: {
type: 1, elements: [
// { type: 22, count: 5 },
// { type: 23, count: 1 },
{ type: 24, count: 2 },
{ type: 25, count: 3 },
{ type: 26, count: 4 }
// { type: 22, count: 50 },
// { type: 23, count: 10 },
{ type: 24, count: 20 },
{ type: 25, count: 300 },
{ type: 26, count: 400 }
]
},
starScores: [15000, 20000, 25000],
......@@ -165,7 +165,9 @@ export const Chapters14: ChapterData[] = [
lattices:
[0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 6, 0, 3, 0, 6, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0],
connectedLats: [],
elements: [1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 4, 1, 1, 1, 4, 1, 4, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 1, 1, 2, 2, 2, 1, 1, 4, 4, 2, 4, 2, 4, 2, 4, 2, 4, 1, 4, 2, 4, 2, 4, 2, 4, 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: 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: 9, type: null }, { index: 17, type: null }]
elements: [
1, 13, 1, 1, 1, 1, 13, 1, 1,
1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 4, 1, 1, 1, 4, 1, 4, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 1, 1, 2, 2, 2, 1, 1, 4, 4, 2, 4, 2, 4, 2, 4, 2, 4, 1, 4, 2, 4, 2, 4, 2, 4, 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: 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: 9, type: null }, { index: 17, type: null }]
}
},
]
import getResPath from "../../../libs/new_tc/getResPath";
import { loadSvga } from "../../loadSvga";
import { createCandyDie0Ani } from "../anis/candy/createCandyDie0Ani";
import { createCandyDie1Ani } from "../anis/candy/createCandyDie1Ani";
import { createCandyDie2Ani } from "../anis/candy/createCandyDie2Ani";
import { createCandyDie3Ani } from "../anis/candy/createCandyDie3Ani";
import { createCandyDie4Ani } from "../anis/candy/createCandyDie4Ani";
import { createCandyDieBgAni } from "../anis/candy/createCandyDieBgAni";
import { createCandyDis0Ani } from "../anis/candy/createCandyDis0Ani";
import { createCandyDis1Ani } from "../anis/candy/createCandyDis1Ani";
import { createCandyDis2Ani } from "../anis/candy/createCandyDis2Ani";
import { createCandyDis3Ani } from "../anis/candy/createCandyDis3Ani";
import { createCandyDis4Ani } from "../anis/candy/createCandyDis4Ani";
import { createCandySubAni } from "../anis/candy/createCandySubAni";
import { EffectType } from "../enum/EffectType";
import { ElementType, FiveBaseElementTypes, CandyBaseElementType, transElementRes } from "../enum/ElementType";
import { CandyBaseElementType, ElementType, FiveBaseElementTypes, transElementRes } from "../enum/ElementType";
import { RecoverName } from "../enum/RecoverName";
import { stateDatas, StateType } from "../enum/StateType";
import { ExplosiveBgAni } from "../periodAni/ExplosiveBgAni";
......@@ -8,31 +22,26 @@ import { MagicLionBgAni } from "../periodAni/MagicLionBgAni";
import { VerticalBgAni } from "../periodAni/VerticalBgAni";
import { Pool } from "../Pool";
import { Tool } from "../Tool";
import { Candy } from "./Candy";
import { ChickenEgg } from "./ChickenEgg";
import { FestivalEle } from "./FestivalEle";
import { FestivalEle2 } from "./FestivalEle2";
import { State } from "./State";
import { Candy } from "./Candy";
import { createCandySubAni } from "../anis/candy/createCandySubAni";
import { createCandyDie0Ani } from "../anis/candy/createCandyDie0Ani";
import { createCandyDieBgAni } from "../anis/candy/createCandyDieBgAni";
import { createCandyDie1Ani } from "../anis/candy/createCandyDie1Ani";
import { createCandyDie2Ani } from "../anis/candy/createCandyDie2Ani";
import { createCandyDie3Ani } from "../anis/candy/createCandyDie3Ani";
import { createCandyDie4Ani } from "../anis/candy/createCandyDie4Ani";
import { createCandyDis0Ani } from "../anis/candy/createCandyDis0Ani";
import { createCandyDis1Ani } from "../anis/candy/createCandyDis1Ani";
import { createCandyDis2Ani } from "../anis/candy/createCandyDis2Ani";
import { createCandyDis3Ani } from "../anis/candy/createCandyDis3Ani";
import { createCandyDis4Ani } from "../anis/candy/createCandyDis4Ani";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
/**
* 考虑到底继承白鹭的啥Component还是Container
* 坐标原点需要坐落在格子的中心点
* 最好到时按,底图,动效,气泡,笼子,毛球,进行分层,如果多个状态要共存时,必须分层,到时气泡的动画,要写再自己的层里
*/
export class Element extends eui.Component {
private _fireworksTimer = 0;
get canFire() {
const t = new Date().getTime();
return t - this._fireworksTimer > 2 * 1000;
}
fire() {
this._fireworksTimer = new Date().getTime();
}
async resetFireworks() {
}
......@@ -84,7 +93,7 @@ export class Element extends eui.Component {
this.toStandByAction();
}
if (mv.currentFrame == 391) {
r();
// const tex: egret.Texture = RES.getRes("ele20_png");
// const pic = new egret.Bitmap(tex);
......
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