Commit 9f6b9747 authored by wildfirecode's avatar wildfirecode

1

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