Commit 9f6b9747 authored by wildfirecode's avatar wildfirecode

1

parent 05de78d0
......@@ -68,6 +68,7 @@ import getRedBombAward, { getRedBombTimes } from '../getRedBombAward';
import { FesRedBombShowAni } from '../something/anisCall/FesRedBombShowAni';
import { RectsWaveAni } from '../something/anisCall/RectsWaveAni';
import { isSpecialLattice } from '../something/enum/LatticeType';
import { ElementConfigType } from '../something/enum/ElementConfigType';
const aniClass = {
"BoomAni": BoomAni,
......@@ -558,16 +559,16 @@ export default class MainScene extends Scene {
var p = Tool.getPositionByIndex(i);
switch (elements[i]) {
//如果为0记录空格
case 0:
case ElementConfigType.EMPTY:
this.emptys.push(i);
break;
//基础元素,枷锁,气泡,灰色毛球,褐色毛球,黑色毛球
case 1:
case 4:
case 7:
case 8:
case 9:
case 10:
case ElementConfigType.BASE:
case ElementConfigType.LOCK:
case ElementConfigType.BUBBLE:
case ElementConfigType.HAIRBALLGREY:
case ElementConfigType.HAIRBALLBROWN:
case ElementConfigType.HAIRBALLBLACK:
var type = Tool.returnType(i, this.lattices, this.chapterData.baseElementTypes);
let ele: Element = Pool.takeOut(RecoverName.ELEMENT);
if (!ele) {
......@@ -579,30 +580,30 @@ export default class MainScene extends Scene {
ele.y = p[1];
this.elementContainer.addChild(ele);
this.lattices[i].element = ele;
if (elements[i] == 4) {
if (elements[i] == ElementConfigType.LOCK) {
ele.setState(StateType.LOCK, true)
}
//气泡
else if (elements[i] == 7) {
else if (elements[i] == ElementConfigType.BUBBLE) {
//气泡要设定type
ele.setState(StateType.BUBBLE, true, type)
}
//灰色毛球
else if (elements[i] == 8) {
else if (elements[i] == ElementConfigType.HAIRBALLGREY) {
ele.setState(StateType.HAIRBALLGREY, true)
}
//褐色毛球
else if (elements[i] == 9) {
else if (elements[i] == ElementConfigType.HAIRBALLBROWN) {
ele.setState(StateType.HAIRBALLBROWN, true)
}
//黑色毛球
else if (elements[i] == 10) {
else if (elements[i] == ElementConfigType.HAIRBALLBLACK) {
ele.setState(StateType.HAIRBALLBLACK, true)
}
break;
//棒棒糖
case 3:
case ElementConfigType.LOLLIPOP:
this.lollipopCount++;
let lol: Element = Pool.takeOut(RecoverName.ELEMENT);
if (!lol) {
......@@ -616,7 +617,7 @@ export default class MainScene extends Scene {
this.lattices[i].element = lol;
break;
//石头
case 2:
case ElementConfigType.ROCK:
let rock: Element = Pool.takeOut(RecoverName.ELEMENT);
if (!rock) {
rock = new Element(ElementType.ROCK)
......@@ -629,7 +630,7 @@ export default class MainScene extends Scene {
this.lattices[i].element = rock;
break;
//果冻
case 5:
case ElementConfigType.JELLY:
let jelly: Element = Tool.getElement(ElementType.JELLY)
jelly.x = p[0];
jelly.y = p[1];
......@@ -637,7 +638,7 @@ export default class MainScene extends Scene {
this.lattices[i].element = jelly;
break;
//鸡蛋
case 6:
case ElementConfigType.CHICKEN_EGG:
let egg: Element = Tool.getElement(ElementType.CHICKEN_EGG)
egg.x = p[0];
egg.y = p[1];
......
......@@ -23,7 +23,7 @@ export const Chapters2: ChapterData[] = [
starScores: [4000, 8000, 12000],
map: {
lattices: [
0, 3, 3, 3, 3, 3, 3, 3, 0,
0, 4, 3, 3, 3, 3, 3, 3, 0,
0, 3, 3, 3, 3, 3, 3, 3, 0,
0, 2, 2, 2, 2, 2, 2, 2, 0,
0, 2, 2, 2, 2, 2, 2, 2, 0,
......
......@@ -6,6 +6,30 @@ export enum ElementConfigType {
* 空元素格
*/
EMPTY=0,
/**
* 基础元素
*/
BASE=1,
/**
* 石头
*/
ROCK=2,
/**
* 石头
*/
LOLLIPOP=3,
/**
* 枷锁
*/
LOCK=4,
/**
* JELLY
*/
JELLY=5,
/**
* CHICKEN_EGG
*/
CHICKEN_EGG=6,
/**
* 气泡
*/
......
......@@ -6,7 +6,7 @@ export enum LatticeType {
NORMAL=1,
ICE=2,
DARK_ICE=3,
STONE=4,
STONE=4, //会持续存在,无法像冰块一样被消除,但是上方可以存在元素。只是展示的时候
STONE_AND_ICE=5,
STONE_AND_DARK_ICE=6
}
......
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