Răsfoiți Sursa

添加水果出售 赠予

eraser 3 ani în urmă
părinte
comite
c19900c663

Fișier diff suprimat deoarece este prea mare
+ 5389 - 63
assets/Scene/MyCityScene - 004.fire


+ 40 - 3
assets/Script/UI/BuildingView.js

@@ -128,7 +128,6 @@ cc.Class({
         this.SeedBtn.setContentSize(100,54);
         this.FruitBtn.setContentSize(100,54);
 
-
         this.EvnBtn.y = -5;
         this.LabourBtn.y = -5;
         this.ShopBtn.y = -5;
@@ -190,8 +189,29 @@ cc.Class({
             this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Seed_Sprite;
             this.Seed.active = true;
             this.SelectedFrame.parent = this.Building40;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building40.getComponent('Content_Button').Name, this.Building40.getComponent('Content_Button').Price, this.Building40.getComponent('Content_Button').Synopsis);
 
+            GlobalD.GameData.getMallSeed(function(res, vaule)
+            {
+                let Synopsis = "成熟期:"+maturity;
+                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, vaule.data[0].price, Synopsis);
+            });
+
+            //         "id": 1,
+            //         "mallType": "0",
+            //         "picture": null,
+            //         "name": "白菜种子",
+            //         "maturity": 100,
+            //         "planting": 100,
+            //         "harvestQuantity": 2500,
+            //         "harvestCount": 2500,
+            //         "harvestName": "大白菜",
+            //         "price": 99,
+            //         "amount": 0,
+            //         "withered": 200,
+            //         "createTime": "2022-01-10 16:45:18",
+            //         "updateTime": "2022-01-10 16:45:26"
+            //     },
+           
             this.SeedBtn.setSiblingIndex(10);
             this.SeedBtn.setContentSize(86,88);
         } 
@@ -201,8 +221,25 @@ cc.Class({
             this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Fruit_Sprite;
             this.Fruit.active = true;
             this.SelectedFrame.parent = this.Building50;
-            this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building50.getComponent('Content_Button').Name, this.Building50.getComponent('Content_Button').Price, this.Building50.getComponent('Content_Button').Synopsis);
 
+            //         {
+        //             "id": 1,
+        //             "picture": null,
+        //             "name": "白菜",
+        //             "priceSnb": 99,
+        //             "priceCnt": 9.9,
+        //             "createTime": "2022-01-10 16:45:18",
+        //             "updateTime": "2022-01-10 16:45:26"
+        //         }
+
+            GlobalD.GameData.getMallSeed(function(res, vaule)
+            {
+                let Price = 'Snb:'+vaule.data[0].priceSnb+' Cnt:'+vaule.data[0].priceCnt;
+                let Synopsis = "成熟期:"+maturity;
+                this.ManageUI.getComponent('ManageUI').onSetButtonInfo(vaule.data[0].name, Price, Synopsis);
+
+            });
+            
             this.FruitBtn.setSiblingIndex(10);
             this.FruitBtn.setContentSize(86,88);
         }

+ 16 - 0
assets/Script/UI/CloseBtn.js

@@ -0,0 +1,16 @@
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        targetNode: {
+           default: null,        // The default value will be used only when the component attaching
+                                 // to a node for the first time
+           type: cc.Node, // optional, default is typeof default
+           serializable: true,   // optional, default is true
+        }
+    },
+    Close()
+    {
+        this.targetNode.active = false;
+    }
+});

+ 9 - 0
assets/Script/UI/CloseBtn.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "0ecf947c-6a87-415d-8b9a-9edab2e66590",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 8 - 0
assets/Script/UI/ManageBuildings.js

@@ -803,4 +803,12 @@ cc.Class({
         }
         return buildingName;
     },
+    Grant()
+    {
+
+    },
+    Sale()
+    {
+
+    }
 });

+ 16 - 0
assets/Script/UI/OpenPannel.js

@@ -0,0 +1,16 @@
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        targetNode: {
+           default: null,        // The default value will be used only when the component attaching
+                                 // to a node for the first time
+           type: cc.Node, // optional, default is typeof default
+           serializable: true,   // optional, default is true
+        }
+    },
+    Open()
+    {
+        this.targetNode.active = true;
+    }
+});

+ 9 - 0
assets/Script/UI/OpenPannel.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "5b9f6555-06d8-4c34-a366-c45309dabdc0",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 4 - 4
assets/Script/public/GameData.js

@@ -991,7 +991,7 @@ cc.Class({
         })
     },
     //获取商城种子
-    getMallSeed() {
+    getMallSeed(callback) {
         // "data": [
         //     {
         //         "id": 1,
@@ -1027,11 +1027,11 @@ cc.Class({
         //     }
         // ],
         utils.get(utils.api.mallSeed, {}, (res, vaule) => {
-
+            callback(res, vaule);
         })
     },
 
-    getWarehouseSeedAndFruit() {
+    getWarehouseSeedAndFruit(callback) {
         // "data": {
         //     "seed": [
         //         {
@@ -1064,7 +1064,7 @@ cc.Class({
         //     ]
         // },
         utils.get(utils.api.getSeedAndFruit, {}, (res, vaule) => {
-
+            callback(res, vaule);
         })
     }
 });

BIN
assets/UI/NPublic/GrantFruitTitle.png


+ 34 - 0
assets/UI/NPublic/GrantFruitTitle.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "b4db16f5-37a4-4790-90be-45e778068b82",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "GrantFruitTitle": {
+      "ver": "1.0.4",
+      "uuid": "2317ca51-d5e9-4438-8301-6b72bcb5556e",
+      "rawTextureUuid": "b4db16f5-37a4-4790-90be-45e778068b82",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 255,
+      "height": 105,
+      "rawWidth": 255,
+      "rawHeight": 105,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/PopViewBG.png


+ 34 - 0
assets/UI/NPublic/PopViewBG.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "614997a8-4008-401f-a406-120b965af887",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "PopViewBG": {
+      "ver": "1.0.4",
+      "uuid": "6255e000-b232-46fd-9bb5-5b905fc61fe7",
+      "rawTextureUuid": "614997a8-4008-401f-a406-120b965af887",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -0.5,
+      "offsetY": 1,
+      "trimX": 2,
+      "trimY": 2,
+      "width": 594,
+      "height": 538,
+      "rawWidth": 599,
+      "rawHeight": 544,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NPublic/SaleFruitTitle.png


+ 34 - 0
assets/UI/NPublic/SaleFruitTitle.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "bdbb8e99-c672-4613-abda-7e9d3f0383a8",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "SaleFruitTitle": {
+      "ver": "1.0.4",
+      "uuid": "7cedda58-ddbe-4c73-93a5-e4e9a2cdccc7",
+      "rawTextureUuid": "bdbb8e99-c672-4613-abda-7e9d3f0383a8",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 255,
+      "height": 105,
+      "rawWidth": 255,
+      "rawHeight": 105,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NScene/Fruits/Grant.png


+ 34 - 0
assets/UI/NScene/Fruits/Grant.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "b6af3181-ef78-4b6f-bc72-235dbb4d6cf7",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Grant": {
+      "ver": "1.0.4",
+      "uuid": "259987bb-0a59-45ea-93e5-e426be699d29",
+      "rawTextureUuid": "b6af3181-ef78-4b6f-bc72-235dbb4d6cf7",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 80,
+      "height": 43,
+      "rawWidth": 80,
+      "rawHeight": 43,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NScene/Fruits/Sale.png


+ 34 - 0
assets/UI/NScene/Fruits/Sale.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "82b67b73-e2d5-4658-972c-2c1a05c8e607",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Sale": {
+      "ver": "1.0.4",
+      "uuid": "30b277f2-db20-4081-9ad1-f2e6be16bf10",
+      "rawTextureUuid": "82b67b73-e2d5-4658-972c-2c1a05c8e607",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 80,
+      "height": 43,
+      "rawWidth": 80,
+      "rawHeight": 43,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff