浏览代码

1.修改bug

slambb 3 年之前
父节点
当前提交
0346fec2cb

+ 5 - 5
assets/Prefabs/NBuildings/Labour/Labour_206_Holy_Animal.prefab

@@ -2522,8 +2522,8 @@
         0,
         0,
         1,
-        0.83333,
-        0.83333,
+        0.7,
+        0.7,
         0.83333
       ]
     },
@@ -2731,8 +2731,8 @@
         0,
         0,
         1,
-        0.83333,
-        0.83333,
+        0.7,
+        0.7,
         0.83333
       ]
     },
@@ -2832,7 +2832,7 @@
       "__uuid__": "29127c44-b24c-4e3b-a28f-30684f9fc8c3"
     },
     "_type": 0,
-    "_sizeMode": 0,
+    "_sizeMode": 1,
     "_fillType": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",

文件差异内容过多而无法显示
+ 160 - 173
assets/Scene/MyCityScene - 004.fire


+ 1 - 1
assets/Script/UI/CollectHarvest.js

@@ -31,7 +31,7 @@ cc.Class({
     playScale(){
         // console.log("play");
         this.node.stopAllActions();
-        var s = cc.sequence(cc.scaleTo(0.5, 1.5),cc.scaleTo(0.5, 1));
+        var s = cc.sequence(cc.scaleTo(0.5, 1.3),cc.scaleTo(0.5, 0.8));
         var repeat = cc.repeatForever(s);
         this.node.runAction(repeat);
         var s1 = cc.sequence(cc.rotateTo(0.1, -5),cc.rotateTo(0.1, 5));

+ 4 - 4
assets/Script/UI/ManageBuildings.js

@@ -165,10 +165,10 @@ cc.Class({
             let _tiledPosArray = GlobalD.TiledMap.onGetLandList();
             let _tiledPosArrayAni = GlobalD.TiledMap.onGetBreedList();
 
-            console.log("_userLeaseLand", _userLeaseLand);
-            console.log("_tiledPosArray:", _tiledPosArray);
-            console.log("_tiledPosArrayAni", _tiledPosArrayAni);
-            console.log("_configLand:", _configLand);
+            // console.log("_userLeaseLand", _userLeaseLand);
+            // console.log("_tiledPosArray:", _tiledPosArray);
+            // console.log("_tiledPosArrayAni", _tiledPosArrayAni);
+            // console.log("_configLand:", _configLand);
             // if (_tiledPosArray.length != _configLand.length) {
             //     console.error("服务器土地id配置对应地图配置错误!")
             //     return;

+ 1 - 1
assets/Script/UI/ManageSeedNode.js

@@ -208,7 +208,7 @@ cc.Class({
             //养殖场的信息
             _leaselandInfoScript = this.targetBuildingsInfo.getComponent("LeaseAnimalInfo");
         }
-        console.log("_leaselandInfoScript:",_leaselandInfoScript);
+        // console.log("_leaselandInfoScript:",_leaselandInfoScript);
         if(!_leaselandInfoScript){
             GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), "种子(幼苗)类型不对!", 2);
             return;

+ 2 - 2
assets/Script/Unit/TiledMap/TiledMap.js

@@ -78,8 +78,8 @@ cc.Class({
         //     console.log(landInfo[i].name,_x,_y ,"(", back.x, ",", back.y, ")");
         // }
 
-        let initBreedInfo = this._tiledMap.getObjectGroup('initBreed').getObjects();
-        console.log("initBreedInfo::", initBreedInfo);
+        // let initBreedInfo = this._tiledMap.getObjectGroup('initBreed').getObjects();
+        // console.log("initBreedInfo::", initBreedInfo);
         // for (let i = 0; i < landInfo.length; i++) {
         //     let _x = landInfo[i].x + this.node.getPosition().x;
         //     let _y = landInfo[i].y + this.node.getPosition().y;

+ 9 - 15
assets/Script/build/LeaseAnimalInfo.js

@@ -244,10 +244,9 @@ cc.Class({
                 // console.log(value);
                 if (0 === value.code) {
                     //收成后处理相关状态
-                    this.harvestNode.active = false;
-                    //隐藏养殖
-                    this.midAnimal.active = false;
-                    this._workingBuildingAnimal.onResetAnimal();
+                    this.leaseLandInfo.plant = 0;
+                    this.leaseLandInfo.seedInfo = null;
+                    this._resetLandInfo();
                     //更新仓库列表
                     this._buildingView.onUpdateList();
                     if (value.data.isWithered) {
@@ -261,13 +260,6 @@ cc.Class({
                             GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.data.msg, 2);
                         }
                     }
-
-                    this.isShowHarvest = false;
-                    this.isShowIndex = 0;
-                    if (this.timeInterval) {
-                        clearInterval(this.timeInterval);
-                        this.timeInterval = null;
-                    }
                 } else if (706 === value.code) {
                     //土地到期,没有更新刷新的处理刷新
                     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
@@ -366,13 +358,16 @@ cc.Class({
         if (this.notLeased) {
             this.notLeased.active = true;
         }
+        //清除当前租赁数据
+        this.leaseLandInfo = null;
+        this._resetLandInfo();
 
+    },
+    _resetLandInfo() {
         //隐藏养殖
         this.midAnimal.active = false;
         this._workingBuildingAnimal.onResetAnimal();
 
-        //清除当前租赁数据
-        this.leaseLandInfo = null;
         this.isShowHarvest = false;
         this.isShowIndex = 0;
         if (this.timeInterval) {
@@ -391,7 +386,6 @@ cc.Class({
         this._workingBuildingAnimal.onResetAnimal();
 
         this.onSetInfoBoxActive(false);
-
     },
     //设置config的土地信息
     setConfigLandInfo(value) {
@@ -588,7 +582,7 @@ cc.Class({
                             //显示收成时候,需要处理一个枯萎状态,枯萎状态不能收成
                             if (bSelf) {
                                 this.harvestNode.getChildByName("harvest").getComponent(cc.Sprite).spriteFrame = this._workingBuildingAnimal.onGetMatureBreed(this.leaseLandInfo.withered, this.currentAnimalType);
-                                console.log(this.harvestNode.getChildByName("harvest").getComponent(cc.Sprite).spriteFrame);
+                                //console.log(this.harvestNode.getChildByName("harvest").getComponent(cc.Sprite).spriteFrame);
                                 this.onShowHarvest();
                             } else {
                                 //存在可偷的状态才设置这个图标,

+ 27 - 29
assets/Script/build/LeaseFarmlandInfo.js

@@ -229,9 +229,9 @@ cc.Class({
                 // console.log(value);
                 if (0 === value.code) {
                     //收成后处理相关状态
-                    this.harvestNode.active = false;
-                    this.midSliderNode.active = false
-                    this._workingBuilding.onSetGrow(0, null);
+                    this.leaseLandInfo.plant = 0;
+                    this.leaseLandInfo.seedInfo = null;
+                    this._resetLandInfo();
                     //更新仓库列表
                     this._buildingView.onUpdateList();
                     if (value.data.isWithered) {
@@ -245,19 +245,11 @@ cc.Class({
                             GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.data.msg, 2);
                         }
                     }
-
-                    this.isShowHarvest = false;
-                    this.isShowIndex = 0;
-                    if (this.timeInterval) {
-                        clearInterval(this.timeInterval);
-                        this.timeInterval = null;
-                    }
                 } else if (706 === value.code) {
                     //土地到期,没有更新刷新的处理刷新
                     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
                     //重置锁定状态显示
                     this.onLockLand();
-
                 } else {
                     GlobalD.GameData.showToast(cc.find("Canvas/UICamera"), value.msg, 1);
                 }
@@ -383,28 +375,34 @@ cc.Class({
         if (this.notLeased) {
             this.notLeased.active = true;
         }
-        //清除当前租赁数据
+         //清除当前租赁数据
         this.leaseLandInfo = null;
-        this.isShowHarvest = false;
-        this.isShowIndex = 0;
-        if (this.timeInterval) {
-            clearInterval(this.timeInterval);
-            this.timeInterval = null;
-        }
-
-        //去除提示框
-        this.upSliderNode.parent.active = false;
-        this.midSliderNode.active = false;
-        this.harvestNode.active = false;
-
-        this.stealHarvestNode.active = false;
+        this._resetLandInfo();
 
-        //重置土地图片
-        this._workingBuilding.onSetGrow(0, null);
+    },
+    _resetLandInfo(){
+        
+         this.isShowHarvest = false;
+         this.isShowIndex = 0;
+         if (this.timeInterval) {
+             clearInterval(this.timeInterval);
+             this.timeInterval = null;
+         }
+ 
+         //去除提示框
+         this.upSliderNode.parent.active = false;
+         this.midSliderNode.active = false;
+         this.harvestNode.active = false;
+ 
+         this.stealHarvestNode.active = false;
+ 
+         //重置土地图片
+         this._workingBuilding.onSetGrow(0, null);
+ 
+         this.onSetInfoBoxActive(false);
+    },
 
-        this.onSetInfoBoxActive(false);
 
-    },
     //设置config的土地信息
     setConfigLandInfo(value) {
         this.configLandInfo = value;

+ 0 - 12
assets/resources.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.1.2",
-  "uuid": "f73b8f88-e9e9-4939-8a05-9715f4fadca5",
-  "isBundle": true,
-  "bundleName": "resources",
-  "priority": 8,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

部分文件因为文件数量过多而无法显示