Commit b9ab907e authored by wildfirecode's avatar wildfirecode

1

parent 675d34ee
...@@ -20,7 +20,7 @@ export const Chapters17: ChapterData[] = [ ...@@ -20,7 +20,7 @@ export const Chapters17: ChapterData[] = [
starScores: [1000, 5000, 10000], starScores: [1000, 5000, 10000],
map: { map: {
lattices: [ lattices: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -36,11 +36,11 @@ export const Chapters17: ChapterData[] = [ ...@@ -36,11 +36,11 @@ export const Chapters17: ChapterData[] = [
], ],
// connectedLats: [[0, 18], [1, 19], [2, 20]], // connectedLats: [[0, 18], [1, 19], [2, 20]],
elements: [ elements: [
0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0,
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, 16, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0,
0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
......
...@@ -18,6 +18,7 @@ import { PassType } from "../enum/PassType"; ...@@ -18,6 +18,7 @@ import { PassType } from "../enum/PassType";
import { submitTran } from "../enum/ElementType"; import { submitTran } from "../enum/ElementType";
import { Chapters15 } from "./Chapter15"; import { Chapters15 } from "./Chapter15";
import { Chapters16 } from "./Chapter16"; import { Chapters16 } from "./Chapter16";
import { Chapters17 } from "./Chapter17";
//所有的关卡 //所有的关卡
const chapters: ChapterData[] = [].concat( const chapters: ChapterData[] = [].concat(
...@@ -37,6 +38,7 @@ const chapters: ChapterData[] = [].concat( ...@@ -37,6 +38,7 @@ const chapters: ChapterData[] = [].concat(
Chapters14, Chapters14,
Chapters15, Chapters15,
Chapters16, Chapters16,
Chapters17,
) )
// console.log(chapters) // console.log(chapters)
chapters.forEach((chapter,index) => { chapters.forEach((chapter,index) => {
......
...@@ -253,7 +253,7 @@ export class Element extends eui.Component { ...@@ -253,7 +253,7 @@ export class Element extends eui.Component {
/** /**
* 显示的图片,直接改source,"ele"+type * 显示的图片,直接改source,"ele"+type
*/ */
private showImage: eui.Image; protected showImage: eui.Image;
temEffectType: EffectType = null; temEffectType: EffectType = null;
/** /**
......
...@@ -22,15 +22,15 @@ export class HoneyPot extends eui.Component { ...@@ -22,15 +22,15 @@ export class HoneyPot extends eui.Component {
} }
} }
hide(){ hide() {
this._mv.scaleX=this._mv.scaleY=0; this._mv.scaleX = this._mv.scaleY = 0;
} }
resetStatus() { resetStatus() {
this.addEvents(); this.addEvents();
this._statusNum = 0; this._statusNum = 0;
this._mv.gotoAndPlay(1); this._mv.gotoAndPlay(1);
egret.Tween.get(this._mv).to({scaleY:1,scaleX:1},500,egret.Ease.backOut).call(()=>{ egret.Tween.get(this._mv).to({ scaleY: 1, scaleX: 1 }, 500, egret.Ease.backOut).call(() => {
this.changeSource(); this.changeSource();
}) })
} }
...@@ -43,22 +43,16 @@ export class HoneyPot extends eui.Component { ...@@ -43,22 +43,16 @@ export class HoneyPot extends eui.Component {
* 状态变化 0,1,2,3 * 状态变化 0,1,2,3
*/ */
private _statusNum: number; private _statusNum: number;
res: ElementType;
_mv; _mv;
getRes() { constructor(n: number = 0) {
return `ele${this.res}_${this._statusNum}_png`;
}
type;
constructor(res: ElementType, type: number, n: number = 0) {
super(); super();
this.res = res;
this.type = type;
this._statusNum = n; this._statusNum = n;
this.initSvga(); this.initSvga();
} }
async initSvga() { async initSvga() {
const mv: any = await loadSvga(getResPath() + 'resource/assets/svgas/monster' + this.type + '.svga'); const mv: any = await loadSvga(getResPath() + 'resource/assets/svgas/monster0.svga');
this._mv = mv; this._mv = mv;
this.addChild(mv); this.addChild(mv);
mv.anchorOffsetX = 87 / 2; mv.anchorOffsetX = 87 / 2;
......
import { Element } from "./Element"; import { Element } from "./Element";
import { ElementType } from "../enum/ElementType";
import { Monster } from "./Monster";
import { HoneyPot } from "./HoneyPot";
export default class HoneyPotElement extends Element { export default class HoneyPotElement extends Element {
honeyPot:HoneyPot;
resetView(){ resetView(){
const type = ElementType.HONEY_POT;
this.honeyPot = new HoneyPot();
this.addChild(this.honeyPot);
this.showImage.alpha = 0;
} }
} }
\ No newline at end of file
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