Commit b83ae820 authored by wildfirecode's avatar wildfirecode

1

parent ba1f5b1e
......@@ -289,6 +289,9 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i < 21; i++) {
RES.getResAsync("ele" + i + "_png")
}
for (var i = 22; i <= 27; i++) {
RES.getResAsync("ele" + i + "_png")
}
for (var i = 1; i <= 27; i++) {
RES.getResAsync("bonusFra" + i + "_png")
}
......
This diff is collapsed.
......@@ -13,5 +13,10 @@
<e:Image id="icon8" width="60" height="60" source="startpanel_ele8_png"/>
<e:Image id="icon9" width="60" height="60" source="startpanel_ele9_png"/>
<e:Image id="icon10" width="60" height="60" source="startpanel_ele10_png"/>
<e:Image id="icon22" width="60" height="60" x="0" y="2" source="startpanel_ele22_png"/>
<e:Image id="icon23" width="60" height="60" x="0" y="2.63" source="startpanel_ele23_png"/>
<e:Image id="icon24" width="60" height="60" y="2" source="startpanel_ele24_png"/>
<e:Image id="icon25" width="60" height="60" x="0" y="2" source="startpanel_ele25_png"/>
<e:Image id="icon26" width="60" height="60" x="0" y="2" source="startpanel_ele26_png"/>
<e:BitmapLabel id="txt" text="X0" font="nums2_fnt" scaleX="0.4" scaleY="0.4" y="46" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
......@@ -762,6 +762,15 @@ export default class MainScene extends Scene {
this.lattices[i].element = monster;
monster.resetMonster();
break;
//烟花
case ElementConfigType.FIREWORKS:
let fireworks: Element = Tool.getElement(ElementType.FIREWORKS_SHOOTER)
fireworks.x = p[0];
fireworks.y = p[1];
this.elementContainer.addChild(fireworks);
this.lattices[i].element = fireworks;
fireworks.resetFireworks();
break;
//鸡蛋
case ElementConfigType.CHICKEN_EGG:
let egg: Element = Tool.getElement(ElementType.CHICKEN_EGG)
......@@ -1976,7 +1985,7 @@ export default class MainScene extends Scene {
let jellyMonsterAIResult = 0;
if (!this.jellyBrokenMark) {
jellyMonsterAIResult = await jellyMonsterAI(this);//0说明怪物没有地方可吐了
console.log('干刚才吐了几个', jellyMonsterAIResult);
if (jellyMonsterAIResult > 0) //吐了果冻相当于破了个果冻,那么不再蔓延
this.jellyBrokenMark = true;
}
......@@ -2986,22 +2995,23 @@ export default class MainScene extends Scene {
}
}
checkFireworksNebEle(lat: Lattice) {
var indexMy = lat.index;
checkFireworksNebEle(lat0: Lattice) {
var indexMy = lat0.index;
var indexs = [
indexMy - Tool.colNum,
indexMy + Tool.colNum,
]
if (lat.column > 0) {
];
if (lat0.column > 0) {
indexs.push(indexMy - 1)
}
if (lat.column < Tool.colNum - 1) {
if (lat0.column < Tool.colNum - 1) {
indexs.push(indexMy + 1)
}
for (let i = 0; i < indexs.length; i++) {
let index = indexs[i];
let lat = this.lattices[index];
if (lat.element && lat.element.type == ElementType.FIREWORKS_SHOOTER) {
if (lat && lat.element && lat.element.type == ElementType.FIREWORKS_SHOOTER) {
console.log('111111');
}
}
......@@ -3011,6 +3021,7 @@ export default class MainScene extends Scene {
checkNebAll(latttice: Lattice) {
//如果格子有冰
this.iceBroken(latttice);
this.checkFireworksNebEle(latttice);
//如果附近有石头
this.checkNebEle(latttice, (lat) => {
return lat && lat.element && lat.element.type == ElementType.ROCK
......
......@@ -5,17 +5,15 @@ export default class TargetItemRenderer extends eui.ItemRenderer {
this.skinName = getSkinPath('TargetItem');
}
dataChanged(){
for (let i = 0; i <11; i++) {
this['icon' + i].visible=false;
dataChanged() {
for (let i = 0; i < 28; i++) {
if (this['icon' + i])
this['icon' + i].visible = false;
}
try {
this['icon' + this.data.type].visible=true;
} catch (error) {
}
this['icon' + this.data.type].visible = true;
this['txt'].text = `X${this.data.count }`;
this['txt'].text = `X${this.data.count}`;
}
}
\ No newline at end of file
......@@ -275,6 +275,7 @@ export class Tool {
lat.element.hasState(StateType.BLOCK_LOCK) ||
lat.element.type == ElementType.JELLY ||
lat.element.type == ElementType.JELLY_MONSTER ||
lat.element.type == ElementType.FIREWORKS_SHOOTER ||
lat.element.type == ElementType.CHICKEN_EGG ||
lat.element.type == ElementType.FESTIVALELE_BIG //||
// lat.element.type == ElementType.FESTIVALELE_SMALL
......@@ -299,6 +300,7 @@ export class Tool {
!lat.element.hasState(StateType.HAIRBALLBROWN) &&
!lat.element.hasState(StateType.BLOCK_LOCK) &&
lat.element.type != ElementType.JELLY_MONSTER &&
lat.element.type != ElementType.FIREWORKS_SHOOTER &&
lat.element.type != ElementType.FESTIVALELE_SMALL
) {
return true
......@@ -337,7 +339,9 @@ export class Tool {
}
//上方元素为冰淇淋
else if (lat.element.type == ElementType.LOLLIPOP ||
lat.element.type == ElementType.JELLY_MONSTER) {
lat.element.type == ElementType.JELLY_MONSTER ||
lat.element.type == ElementType.FIREWORKS_SHOOTER
) {
return false
}
//剩下情况
......@@ -414,6 +418,7 @@ export class Tool {
ele.hasState(StateType.HAIRBALLBROWN) ||
ele.type == ElementType.JELLY ||
ele.type == ElementType.JELLY_MONSTER ||
ele.type == ElementType.FIREWORKS_SHOOTER ||
ele.type == ElementType.CHICKEN_EGG ||
ele.type == ElementType.FESTIVALELE_BIG ||
ele.type == ElementType.FESTIVALELE_SMALL
......@@ -435,6 +440,7 @@ export class Tool {
ele.type == ElementType.CHICKEN_EGG ||
ele.type == ElementType.LOLLIPOP ||
ele.type == ElementType.JELLY_MONSTER ||
ele.type == ElementType.FIREWORKS_SHOOTER ||
ele.type == ElementType.FESTIVALELE_BIG ||
ele.type == ElementType.FESTIVALELE_SMALL ||
ele.hasState(StateType.LOCK) ||
......
This source diff could not be displayed because it is too large. You can view the blob instead.
import { ChapterData } from "../interface/ChapterData";
import { Chapters1 } from "./Chapter1";
import { Chapters10 } from "./Chapter10";
import { Chapters11 } from "./Chapter11";
import { Chapters12 } from "./Chapter12";
import { Chapters13 } from "./Chapter13";
import { Chapters14 } from "./Chapter14";
import { Chapters2 } from "./Chapter2";
import { Chapters3 } from "./Chapter3";
import { Chapters4 } from "./Chapter4";
......@@ -8,14 +13,6 @@ import { Chapters6 } from "./Chapter6";
import { Chapters7 } from "./Chapter7";
import { Chapters8 } from "./Chapter8";
import { Chapters9 } from "./Chapter9";
import { Chapters10 } from "./Chapter10";
import { Chapters11 } from "./Chapter11";
import { PassTargetData } from "../interface/PassTargetData";
import { PassType } from "../enum/PassType";
import { submitTran } from "../enum/ElementType";
import { Chapters12 } from "./Chapter12";
import { Chapters13 } from "./Chapter13";
import { Chapters14 } from "./Chapter14";
//所有的关卡
const chapters: ChapterData[] = [].concat(
......
......@@ -33,6 +33,9 @@ import getResPath from "../../../libs/new_tc/getResPath";
* 最好到时按,底图,动效,气泡,笼子,毛球,进行分层,如果多个状态要共存时,必须分层,到时气泡的动画,要写再自己的层里
*/
export class Element extends eui.Component {
async resetFireworks() {
}
_mv;
async resetMonster() {
this.changeSource('empty_png');
......
......@@ -55,7 +55,8 @@ export enum ElementConfigType {
/**
* 果冻怪
*/
JELLY_MONSTER = 12
JELLY_MONSTER = 12,
FIREWORKS = 13,
}
// export const isCandy = (t: ElementConfigType) => {
......
......@@ -38,13 +38,14 @@ export enum ElementType {
MONSTER_JELLY1,
JELLY_MONSTER,
FIREWORKS_SHOOTER,//烟花
FIREWORKS_RABBIT,//烟花目标元素,下同
FIREWORKS_CHICKEN,
FIREWORKS_CATTLE,
FIREWORKS_LION,
FIREWORKS_PIG,
FIREWORKS_SHOOTER,//烟花
}
export enum CandyBaseElementType {
......@@ -182,7 +183,12 @@ export const submitTran = {
5: 9,
6: 3,
9: 2,
10: 10
10: 10,
22: 10,
23: 10,
24: 10,
25: 10,
26: 10
}
// SCORE(1, "分数"),
......
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