Commit dfd0b96c authored by wildfirecode's avatar wildfirecode

1

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