Commit eaac9f93 authored by haiyoucuv's avatar haiyoucuv

wareHouse

parent cd28d80c
This diff is collapsed.
......@@ -24,7 +24,7 @@ export default class WareHousePanel extends Panel {
this.closeBtn = this.addChild(Tool.getSprite('closeBtn.png'));
this.closeBtn.position.set(670, -50);
this.addChild(new WareHouseItem(PLANT_TYPE.Cashew))
this.addChild(new WareHouseItem(PLANT_TYPE.Cashew));
}
public showAni() {
......@@ -58,7 +58,6 @@ class WareHouseItem extends Container {
private countLabel: TextField;
private _count: number = 0;
public get count(): number {
return this._count;
}
......@@ -68,6 +67,15 @@ class WareHouseItem extends Container {
this.countLabel && (this.countLabel.text = `数量:${this._count}`);
}
private _type: PLANT_TYPE;
public get type(): PLANT_TYPE {
return this._type;
}
public set type(type: PLANT_TYPE) {
this._type = type;
}
constructor(type: PLANT_TYPE) {
super();
......
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