eraser 3 年 前
コミット
30f6d4aff3

ファイルの差分が大きいため隠しています
+ 16096 - 31
assets/Scene/MyCityScene - 004.fire


+ 74 - 12
assets/Script/UI/BuildingView.js

@@ -18,6 +18,14 @@ cc.Class({
             default: null,
             type: cc.Node,
         },
+        Seed: {
+            default: null,
+            type: cc.Node,
+        },
+        Fruit: {
+            default: null,
+            type: cc.Node,
+        },
         EvnBtn: {
             default: null,
             type: cc.Node,
@@ -34,12 +42,23 @@ cc.Class({
             default: null,
             type: cc.Node,
         },
+        SeedBtn: {
+            default: null,
+            type: cc.Node,
+        },
+        FruitBtn: {
+            default: null,
+            type: cc.Node,
+        },
 
         SelectedFrame: cc.Node,
         Building00: cc.Node,
         Building10: cc.Node,
         Building20: cc.Node,
         Building30: cc.Node,
+
+        Building40: cc.Node,
+        Building50: cc.Node,
         ManageUI: cc.Node,
 
 
@@ -57,6 +76,12 @@ cc.Class({
         Selecteded_Spe_Sprite: cc.SpriteFrame,
 
 
+        Normal_Seed_Sprite: cc.SpriteFrame,
+        Selecteded_Seed_Sprite: cc.SpriteFrame,
+
+        Normal_Fruit_Sprite: cc.SpriteFrame,
+        Selecteded_Fruit_Sprite: cc.SpriteFrame,
+
         //需要切换节点顺序的父节点
         container: cc.Node
     },
@@ -70,6 +95,10 @@ cc.Class({
             this.Shop.active = false;
         if (this.SpeBuilding.active)
             this.SpeBuilding.active = false;
+        if (this.Seed.active)
+            this.Seed.active = false;
+        if (this.Fruit.active)
+            this.Fruit.active = false;
     },
     start(){
         //默认设置第一个节点为 最上面
@@ -78,28 +107,40 @@ cc.Class({
     //切换建筑的面板
     onSwitchBuildingContent(event, index) {
 
-
         this.EvnBtn.setScale(1);
         this.LabourBtn.setScale(1);
         this.ShopBtn.setScale(1);
         this.SpeBuildingBtn.setScale(1);
+        this.SeedBtn.setScale(1);
+        this.FruitBtn.setScale(1);
 
         this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Env_Sprite;
         this.LabourBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Labour_Sprite;
         this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Shop_Sprite;
         this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Spe_Sprite;
+        this.SeedBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Seed_Sprite;
+        this.FruitBtn.getComponent(cc.Sprite).spriteFrame = this.Normal_Fruit_Sprite;
+
+        this.EvnBtn.setContentSize(100,54);
+        this.LabourBtn.setContentSize(100,54);
+        this.ShopBtn.setContentSize(100,54);
+        this.SpeBuildingBtn.setContentSize(100,54);
+        this.SeedBtn.setContentSize(100,54);
+        this.FruitBtn.setContentSize(100,54);
+
 
-        this.EvnBtn.y = 0;
-        this.LabourBtn.y = 0;
-        this.ShopBtn.y = 0;
-        this.SpeBuildingBtn.y = 0;
+        this.EvnBtn.y = -5;
+        this.LabourBtn.y = -5;
+        this.ShopBtn.y = -5;
+        this.SpeBuildingBtn.y = -5;
+        this.SeedBtn.y = -5;
+        this.FruitBtn.y = -5;
 
         this.HiddenAll();
         //面板设置index
         //环境
-        let posY = -5;
         if ('0' == index) {
-            this.EvnBtn.y = posY;
+            this.EvnBtn.y = -20;
             this.EvnBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Env_Sprite;
             this.Env.active = true;
             this.SelectedFrame.parent = this.Building00;
@@ -107,38 +148,59 @@ cc.Class({
             
             //设置节点顺序
             this.EvnBtn.setSiblingIndex(10);
-
+            this.EvnBtn.setContentSize(86,88);
         }
         //劳动 
         else if ('1' == index) {
-            this.LabourBtn.y = posY;
+            this.LabourBtn.y = -20;
             this.LabourBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Labour_Sprite;
             this.Labour.active = true;
             this.SelectedFrame.parent = this.Building10;
             this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building10.getComponent('Content_Button').Name, this.Building10.getComponent('Content_Button').Price, this.Building10.getComponent('Content_Button').Synopsis);
        
             this.LabourBtn.setSiblingIndex(10);
+            this.LabourBtn.setContentSize(86,88);
         }
         //商铺
         else if ('2' == index) {
-            this.ShopBtn.y = posY;
+            this.ShopBtn.y = -20;
             this.ShopBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Shop_Sprite;
             this.Shop.active = true;
             this.SelectedFrame.parent = this.Building20;
             this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building20.getComponent('Content_Button').Name, this.Building20.getComponent('Content_Button').Price, this.Building20.getComponent('Content_Button').Synopsis);
 
             this.ShopBtn.setSiblingIndex(10);
+            this.ShopBtn.setContentSize(86,88);
 
         } else if ('3' == index) {
-            this.SpeBuildingBtn.y = posY;
+            this.SpeBuildingBtn.y = -20;
             this.SpeBuildingBtn.getComponent(cc.Sprite).spriteFrame = this.Selecteded_Spe_Sprite;
             this.SpeBuilding.active = true;
             this.SelectedFrame.parent = this.Building30;
             this.ManageUI.getComponent('ManageUI').onSetButtonInfo(this.Building30.getComponent('Content_Button').Name, this.Building30.getComponent('Content_Button').Price, this.Building30.getComponent('Content_Button').Synopsis);
 
             this.SpeBuildingBtn.setSiblingIndex(10);
-
+            this.SpeBuildingBtn.setContentSize(86,88);
+        } else if ('4' == index) {
+            this.SeedBtn.y = -20;
+            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);
+
+            this.SeedBtn.setSiblingIndex(10);
+            this.SeedBtn.setContentSize(86,88);
+        } else if ('5' == index) {
+            this.FruitBtn.y = -20;
+            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);
+
+            this.FruitBtn.setSiblingIndex(10);
+            this.FruitBtn.setContentSize(86,88);
         }
+    
 
         //切换节点顺序
         // this.switch();

BIN
assets/UI/NBuilding/fruit_button.png


+ 34 - 0
assets/UI/NBuilding/fruit_button.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "2bc16683-13bd-4ab9-a1b5-8a3102a19e19",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "fruit_button": {
+      "ver": "1.0.4",
+      "uuid": "0523119f-36db-423a-9fbc-c1155d27ab4c",
+      "rawTextureUuid": "2bc16683-13bd-4ab9-a1b5-8a3102a19e19",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 129,
+      "height": 104,
+      "rawWidth": 129,
+      "rawHeight": 104,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/fruit_nbutton.png


+ 34 - 0
assets/UI/NBuilding/fruit_nbutton.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "c87623dc-a955-4cc3-b5d6-cae84a6c59da",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "fruit_nbutton": {
+      "ver": "1.0.4",
+      "uuid": "d25551bf-95bf-433f-a093-35d661b00e35",
+      "rawTextureUuid": "c87623dc-a955-4cc3-b5d6-cae84a6c59da",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 133,
+      "height": 56,
+      "rawWidth": 133,
+      "rawHeight": 56,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/seed_button.png


+ 34 - 0
assets/UI/NBuilding/seed_button.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "2c768974-3731-4992-b6bb-f1b26c0d0c84",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "seed_button": {
+      "ver": "1.0.4",
+      "uuid": "c189f0ee-8111-4422-b152-b05a1fc3246c",
+      "rawTextureUuid": "2c768974-3731-4992-b6bb-f1b26c0d0c84",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 129,
+      "height": 104,
+      "rawWidth": 129,
+      "rawHeight": 104,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NBuilding/seed_nbutton.png


+ 34 - 0
assets/UI/NBuilding/seed_nbutton.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "b87beb5a-2e52-4f89-8e02-ad01d457ed05",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "seed_nbutton": {
+      "ver": "1.0.4",
+      "uuid": "6a8bb191-2ad5-4240-ac1a-c8be010d5f66",
+      "rawTextureUuid": "b87beb5a-2e52-4f89-8e02-ad01d457ed05",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 133,
+      "height": 56,
+      "rawWidth": 133,
+      "rawHeight": 56,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NOther/MainMenu/Repository.png


+ 34 - 0
assets/UI/NOther/MainMenu/Repository.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "c6917fd1-f166-45e8-9190-a67dda3ce709",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Repository": {
+      "ver": "1.0.4",
+      "uuid": "23336205-80c5-4764-870d-cda364537876",
+      "rawTextureUuid": "c6917fd1-f166-45e8-9190-a67dda3ce709",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 1,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 126,
+      "height": 133,
+      "rawWidth": 126,
+      "rawHeight": 135,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NOther/MainMenu/Store.png


+ 34 - 0
assets/UI/NOther/MainMenu/Store.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "193278c4-a8bb-4e51-8793-f21b4d3caff5",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "Store": {
+      "ver": "1.0.4",
+      "uuid": "d7506095-7767-45b1-930e-c2b8db61fd3b",
+      "rawTextureUuid": "193278c4-a8bb-4e51-8793-f21b4d3caff5",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 1,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 131,
+      "height": 127,
+      "rawWidth": 131,
+      "rawHeight": 129,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません