|
|
@@ -147,13 +147,16 @@ cc.Class({
|
|
|
// console.log(this.mySeedList, this.myFruitList);
|
|
|
for (let i = 0; i < this.mySeedList.length; i++) {
|
|
|
//没有种子数量不显示 todo 看看后续需不需要处理删除
|
|
|
- if (this.mySeedList[i].amount < 1) continue;
|
|
|
-
|
|
|
+ //if (this.mySeedList[i].amount < 1) continue;
|
|
|
+
|
|
|
let _seed = cc.instantiate(this.seedPrefab);
|
|
|
_seed.parent = this.Seed;
|
|
|
- // if(0 == i){
|
|
|
- // this.Building40 = _seed;
|
|
|
- // }
|
|
|
+
|
|
|
+ if (this.mySeedList[i].amount == 0)
|
|
|
+ {
|
|
|
+ _seed.getChildByName("SellOut").active = 0;
|
|
|
+ }
|
|
|
+
|
|
|
let _seedScript = _seed.getComponent("Content_Button");
|
|
|
_seedScript.Name = this.mySeedList[i].name;
|
|
|
_seedScript.Price = 0;
|