|
@@ -26,6 +26,12 @@ cc.Class({
|
|
|
default: null,
|
|
default: null,
|
|
|
type: cc.Node,
|
|
type: cc.Node,
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+ warehouseScrollView: {
|
|
|
|
|
+ default: null,
|
|
|
|
|
+ type: cc.ScrollView
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
EvnBtn: {
|
|
EvnBtn: {
|
|
|
default: null,
|
|
default: null,
|
|
|
type: cc.Node,
|
|
type: cc.Node,
|
|
@@ -107,6 +113,11 @@ cc.Class({
|
|
|
// if (this.SpeBuilding.active) this.SpeBuilding.active = false
|
|
// if (this.SpeBuilding.active) this.SpeBuilding.active = false
|
|
|
if (this.Seed.active) this.Seed.active = false
|
|
if (this.Seed.active) this.Seed.active = false
|
|
|
if (this.Fruit.active) this.Fruit.active = false
|
|
if (this.Fruit.active) this.Fruit.active = false
|
|
|
|
|
+
|
|
|
|
|
+ if (this.warehouseScrollView) {
|
|
|
|
|
+ this.warehouseScrollView.stopAutoScroll();
|
|
|
|
|
+ this.warehouseScrollView.scrollToTop();
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
start() {
|
|
start() {
|
|
|
//默认设置第一个节点为 最上面
|
|
//默认设置第一个节点为 最上面
|
|
@@ -376,7 +387,7 @@ cc.Class({
|
|
|
// this.SpeBuildingBtn.setSiblingIndex(10)
|
|
// this.SpeBuildingBtn.setSiblingIndex(10)
|
|
|
// this.SpeBuildingBtn.setContentSize(110, 100)
|
|
// this.SpeBuildingBtn.setContentSize(110, 100)
|
|
|
// }else
|
|
// }else
|
|
|
- //种子
|
|
|
|
|
|
|
+ //种子
|
|
|
if ('4' == index) {
|
|
if ('4' == index) {
|
|
|
// this.SeedBtn.y = -20
|
|
// this.SeedBtn.y = -20
|
|
|
this.SeedBtn.getComponent(cc.Sprite).spriteFrame =
|
|
this.SeedBtn.getComponent(cc.Sprite).spriteFrame =
|
|
@@ -404,7 +415,7 @@ cc.Class({
|
|
|
// this.FruitBtn.y = -20
|
|
// this.FruitBtn.y = -20
|
|
|
this.FruitBtn.getComponent(cc.Sprite).spriteFrame =
|
|
this.FruitBtn.getComponent(cc.Sprite).spriteFrame =
|
|
|
this.Selecteded_Fruit_Sprite
|
|
this.Selecteded_Fruit_Sprite
|
|
|
- this.Fruit.active = true
|
|
|
|
|
|
|
+ this.Fruit.active = true;
|
|
|
|
|
|
|
|
if (this.myFruitList.length > 0) {
|
|
if (this.myFruitList.length > 0) {
|
|
|
let Synopsis = this.myFruitList[0].fruitDescribe;
|
|
let Synopsis = this.myFruitList[0].fruitDescribe;
|