Commit dfd0b96c authored by wildfirecode's avatar wildfirecode

1

parent 09551666
...@@ -276,6 +276,7 @@ export class Tool { ...@@ -276,6 +276,7 @@ export class Tool {
lat.element.hasState(StateType.HONEY) || lat.element.hasState(StateType.HONEY) ||
lat.element.hasState(StateType.BLOCK_LOCK) || lat.element.hasState(StateType.BLOCK_LOCK) ||
lat.element.monster || lat.element.monster ||
lat.element.type == ElementType.HONEY_POT ||
lat.element.type == ElementType.JELLY || lat.element.type == ElementType.JELLY ||
lat.element.type == ElementType.JELLY_MONSTER || lat.element.type == ElementType.JELLY_MONSTER ||
lat.element.type == ElementType.FIREWORKS_SHOOTER || lat.element.type == ElementType.FIREWORKS_SHOOTER ||
......
...@@ -674,7 +674,7 @@ export class Element extends eui.Component { ...@@ -674,7 +674,7 @@ export class Element extends eui.Component {
return ele return ele
} }
get candy() { return this._candy } get candy() { return this._candy }
resetView(){} resetView(...args){}
onElimiate(){} onElimiate(){}
get isActive() { return false } get isActive() { return false }
canElimite:boolean; canElimite:boolean;
......
...@@ -53,6 +53,7 @@ export class HoneyPot extends eui.Component { ...@@ -53,6 +53,7 @@ export class HoneyPot extends eui.Component {
* 状态变化 0,1,2,3 * 状态变化 0,1,2,3
*/ */
private _statusNum: number; private _statusNum: number;
get statusNum(){return this._statusNum}
private _honeyPotElement: HoneyPotElement; private _honeyPotElement: HoneyPotElement;
private _mvList: any[]; private _mvList: any[];
......
...@@ -8,8 +8,8 @@ export default class HoneyPotElement extends Element { ...@@ -8,8 +8,8 @@ export default class HoneyPotElement extends Element {
} }
honeyPot: HoneyPot; honeyPot: HoneyPot;
resetView() { resetView(statusNum) {
this.honeyPot = new HoneyPot(this); this.honeyPot = new HoneyPot(this,statusNum);
this.addChild(this.honeyPot); this.addChild(this.honeyPot);
this.showImage.alpha = 0; this.showImage.alpha = 0;
} }
......
import { Tool } from "./Tool"; import { Tool } from "./Tool";
import { Element } from "./class/Element"; import { Element } from "./class/Element";
import { ElementType } from "./enum/ElementType"; import { ElementType } from "./enum/ElementType";
import HoneyPotElement from "./class/HoneyPotElement";
export default (fromElement: Element) => { export default (fromElement: Element) => {
let ele = Tool.getElement(fromElement.type); let ele = Tool.getElement(fromElement.type);
...@@ -33,6 +34,9 @@ export default (fromElement: Element) => { ...@@ -33,6 +34,9 @@ export default (fromElement: Element) => {
if (fromElement.type == ElementType.FISH) { if (fromElement.type == ElementType.FISH) {
ele.resetToFishView(fromElement['fish'].state); ele.resetToFishView(fromElement['fish'].state);
} }
if (fromElement.type == ElementType.HONEY_POT) {
ele.resetView( (fromElement as HoneyPotElement).honeyPot.statusNum);
}
return ele; return ele;
} }
\ 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