|
|
@@ -144,18 +144,18 @@ cc.Class({
|
|
|
this.mySeedList = vaule.data.seed;
|
|
|
this.myFruitList = vaule.data.fruit;
|
|
|
|
|
|
- // console.log(this.mySeedList, this.myFruitList);
|
|
|
+ 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 (this.mySeedList[i].amount == 0)
|
|
|
- {
|
|
|
- _seed.getChildByName("SellOut").active = 0;
|
|
|
- }
|
|
|
+ //if (this.mySeedList[i].amount == 0)
|
|
|
+ //{
|
|
|
+ // _seed.getChildByName("SellOut").active = 0;
|
|
|
+ //}
|
|
|
|
|
|
let _seedScript = _seed.getComponent("Content_Button");
|
|
|
_seedScript.Name = this.mySeedList[i].name;
|
|
|
@@ -227,6 +227,11 @@ cc.Class({
|
|
|
_fruitScript.SNB = this.myFruitList[i].priceSnb;
|
|
|
_fruitScript.Synopsis = this.myFruitList[i].fruitDescribe;
|
|
|
|
|
|
+ //if (this.myFruitList[i].amount == 0)
|
|
|
+ //{
|
|
|
+ // _fruit.getChildByName("SellOut").active = 0;
|
|
|
+ //}
|
|
|
+
|
|
|
//设置果实信息
|
|
|
let _contentFruit = _fruit.getComponent("Content_fruit");
|
|
|
_contentFruit.fruitInfo = this.myFruitList[i];
|