zhengniehua 5 лет назад
Родитель
Сommit
e941deff20

Разница между файлами не показана из-за своего большого размера
+ 334 - 242
tower_sanguo/assets/resources/module/drawRecruit/drawGeneral.prefab


BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/bg1-1.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/bg1-1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "c0fc5c73-a906-4f14-bf5a-86dfd1bf13cd",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 750,
+  "height": 1700,
+  "platformSettings": {},
+  "subMetas": {
+    "bg1-1": {
+      "ver": "1.0.4",
+      "uuid": "e9d9f6af-dcd6-4604-bf04-24154e09cace",
+      "rawTextureUuid": "c0fc5c73-a906-4f14-bf5a-86dfd1bf13cd",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 750,
+      "height": 1700,
+      "rawWidth": 750,
+      "rawHeight": 1700,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang1.png


+ 6 - 6
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang1.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "genMipmaps": false,
   "packable": true,
   "packable": true,
-  "width": 181,
-  "height": 251,
+  "width": 493,
+  "height": 684,
   "platformSettings": {},
   "platformSettings": {},
   "subMetas": {
   "subMetas": {
     "kapai_guang1": {
     "kapai_guang1": {
@@ -22,10 +22,10 @@
       "offsetY": 0,
       "offsetY": 0,
       "trimX": 0,
       "trimX": 0,
       "trimY": 0,
       "trimY": 0,
-      "width": 181,
-      "height": 251,
-      "rawWidth": 181,
-      "rawHeight": 251,
+      "width": 493,
+      "height": 684,
+      "rawWidth": 493,
+      "rawHeight": 684,
       "borderTop": 0,
       "borderTop": 0,
       "borderBottom": 0,
       "borderBottom": 0,
       "borderLeft": 0,
       "borderLeft": 0,

BIN
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang2.png


+ 36 - 0
tower_sanguo/assets/resources/module/drawRecruit/texture/kapai_guang2.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "c06894bd-8aa2-4e62-81f4-bbc0e2f286d9",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 493,
+  "height": 684,
+  "platformSettings": {},
+  "subMetas": {
+    "kapai_guang2": {
+      "ver": "1.0.4",
+      "uuid": "68ba1f4a-aca5-4b61-ac9a-8573bc96fe99",
+      "rawTextureUuid": "c06894bd-8aa2-4e62-81f4-bbc0e2f286d9",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 493,
+      "height": 684,
+      "rawWidth": 493,
+      "rawHeight": 684,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

Разница между файлами не показана из-за своего большого размера
+ 118 - 111
tower_sanguo/assets/scenes/Test_Znh.fire


+ 1 - 1
tower_sanguo/assets/scripts/GameController.ts

@@ -39,7 +39,7 @@ class GameController {
     private loadui: LoadingUI;
     private loadui: LoadingUI;
     mainui: MainUI;
     mainui: MainUI;
 
 
-    useLocalServer:boolean = false;
+    useLocalServer:boolean = true;
     //是否测试服
     //是否测试服
     testServer:boolean = true;
     testServer:boolean = true;
 
 

+ 3 - 3
tower_sanguo/assets/scripts/module/drawRecruit/DrawGeneralUI.ts

@@ -115,7 +115,7 @@ export default class DrawGeneralUI extends BaseUI {
         this.isOpenedOne = true;
         this.isOpenedOne = true;
 
 
         let general = DrawRecruitModel.Ins.getAGeneral();
         let general = DrawRecruitModel.Ins.getAGeneral();
-        this.drawItem_one.openDraw(general);
+        this.drawItem_one.openDraw(general,1);
         await Time.WaitForSeconds(0.5);
         await Time.WaitForSeconds(0.5);
         this.panelOne_end.active = true;
         this.panelOne_end.active = true;
         this.panelOne_start.active = false;
         this.panelOne_start.active = false;
@@ -126,7 +126,7 @@ export default class DrawGeneralUI extends BaseUI {
         let general = DrawRecruitModel.Ins.getAGeneral();
         let general = DrawRecruitModel.Ins.getAGeneral();
         for (let i = 0; cc.isValid(this) && i < this.drawItem_tens.length; i++) {
         for (let i = 0; cc.isValid(this) && i < this.drawItem_tens.length; i++) {
             if (!this.isOpenAll) {
             if (!this.isOpenAll) {
-                this.drawItem_tens[i].openDraw(general);
+                this.drawItem_tens[i].openDraw(general,2);
                 await Time.WaitForSeconds(0.3);
                 await Time.WaitForSeconds(0.3);
             } else {
             } else {
                 return;
                 return;
@@ -155,7 +155,7 @@ export default class DrawGeneralUI extends BaseUI {
         let general = DrawRecruitModel.Ins.getAGeneral();
         let general = DrawRecruitModel.Ins.getAGeneral();
         for (let i = 0; i < this.drawItem_tens.length; i++) {
         for (let i = 0; i < this.drawItem_tens.length; i++) {
             if (!this.drawItem_tens[i].isOpened) {
             if (!this.drawItem_tens[i].isOpened) {
-                this.drawItem_tens[i].openDraw(general);
+                this.drawItem_tens[i].openDraw(general,2);
             }
             }
         }
         }
         this.panelTen_start.active = false;
         this.panelTen_start.active = false;

+ 66 - 7
tower_sanguo/assets/scripts/module/drawRecruit/DrawItem.ts

@@ -13,18 +13,36 @@ export default class DrawItem extends cc.Component {
     img_hero: cc.Sprite = null;
     img_hero: cc.Sprite = null;
     @property({ type: cc.Sprite, displayName: "图_阵营" })
     @property({ type: cc.Sprite, displayName: "图_阵营" })
     img_camp: cc.Sprite = null;
     img_camp: cc.Sprite = null;
-    
+
     @property({ type: cc.Sprite, displayName: "图_背光" })
     @property({ type: cc.Sprite, displayName: "图_背光" })
     img_light: cc.Sprite = null;
     img_light: cc.Sprite = null;
     @property({ type: cc.Sprite, displayName: "图_背光开" })
     @property({ type: cc.Sprite, displayName: "图_背光开" })
     img_light_opened: cc.Sprite = null;
     img_light_opened: cc.Sprite = null;
-    
+
+
+    @property({ type: cc.Sprite, displayName: "图_武将背景" })
+    img_bg_hero: cc.Sprite = null;
+    @property({ type: cc.Sprite, displayName: "图_品质框" })
+    img_rect: cc.Sprite = null;
+    @property({ type: cc.Sprite, displayName: "图_名称背板" })
+    img_bg_name: cc.Sprite = null;
+    @property({ type: cc.Label, displayName: "文本_名称" })
+    txt_name: cc.Label = null;
+    @property({ type: cc.Sprite, displayName: "星级数" })
+    stars: cc.Sprite[] = [];
+
+
+
     @property({ type: cc.Node, displayName: "提示_已拥有英雄" })
     @property({ type: cc.Node, displayName: "提示_已拥有英雄" })
     node_hasHero: cc.Node = null;
     node_hasHero: cc.Node = null;
-    
     @property({ type: cc.Label, displayName: "文本_碎片数" })
     @property({ type: cc.Label, displayName: "文本_碎片数" })
     txt_slice: cc.Label = null;
     txt_slice: cc.Label = null;
 
 
+    @property({ type: cc.Material, displayName: "材质_正常" })
+    mat_nor: cc.Material = null;
+    @property({ type: cc.Material, displayName: "材质_灰色" })
+    mat_gray: cc.Material = null;
+
     isOpened = false;
     isOpened = false;
 
 
     onLoad() {
     onLoad() {
@@ -39,9 +57,15 @@ export default class DrawItem extends cc.Component {
         this.img_camp.node.active = false;
         this.img_camp.node.active = false;
     }
     }
 
 
-    openDraw(general: GeneralVO) {
+    /**抽卡 
+     * @param general 武将
+     * @param type 卡类型 1 单抽 2 十连抽
+    */
+    openDraw(general: GeneralVO, type: number = 1) {
         if (this.isOpened) return;
         if (this.isOpened) return;
         this.isOpened = true;
         this.isOpened = true;
+        this.img_light.node.active = type == 1;
+        console.log(" General: ",general);
         cc.loader.loadRes("module/general/texture/hero_img/" + general.resource, cc.SpriteFrame, (errr, asset) => {
         cc.loader.loadRes("module/general/texture/hero_img/" + general.resource, cc.SpriteFrame, (errr, asset) => {
             if (errr) {
             if (errr) {
                 return;
                 return;
@@ -63,10 +87,45 @@ export default class DrawItem extends cc.Component {
                 .start();
                 .start();
         });
         });
         cc.loader.loadRes("module/general/texture/icon_camp_" + general.camp, cc.SpriteFrame, (errr, asset) => {
         cc.loader.loadRes("module/general/texture/icon_camp_" + general.camp, cc.SpriteFrame, (errr, asset) => {
-            if (errr) {
-                return;
-            }
+            if (errr) { return; }
             this.img_camp.spriteFrame = asset;
             this.img_camp.spriteFrame = asset;
         });
         });
+        cc.loader.loadRes("module/general/texture/kapai_kuang" + general.color, cc.SpriteFrame, (errr, asset) => {
+            if (errr) { return; }
+            this.img_rect.spriteFrame = asset;
+        });
+        cc.loader.loadRes("module/general/texture/kapai_name" + general.color, cc.SpriteFrame, (errr, asset) => {
+            if (errr) { return; }
+            this.img_bg_name.spriteFrame = asset;
+        });
+        cc.loader.loadRes("module/general/texture/kapi_bg" + general.color, cc.SpriteFrame, (errr, asset) => {
+            if (errr) { return; }
+            this.img_bg_hero.spriteFrame = asset;
+        });
+        if (general.color == 1) {
+            this.img_light_opened.node.active = false;
+        } else {
+            this.img_light_opened.node.active = true;
+            let url = "module/drawRecruit/texture/kapai_guang1"
+            if (general.color == 2) {
+                url = "module/drawRecruit/texture/kapai_guang2"
+            }
+            cc.loader.loadRes(url, cc.SpriteFrame, (errr, asset) => {
+                if (errr) { return; }
+                this.img_light_opened.spriteFrame = asset;
+            });
+        }
+
+        this.txt_name.string = general.name;
+        for (let i = 0; i < this.stars.length; i++) {
+            if (general.star >= i + 1) {
+                this.stars[i].setMaterial(0, this.mat_nor);
+                //console.log("Star "+general.star+" Index: "+i);
+            } else {
+                this.stars[i].setMaterial(0, this.mat_gray);
+            }
+        }
+
+        //碎片判断 是否已拥有该武将
     }
     }
 }
 }

+ 1 - 2
tower_sanguo/assets/scripts/net/HttpCommand.ts

@@ -48,8 +48,7 @@ export default class HttpCommand {
     connectTest(callback) {
     connectTest(callback) {
         GameController.commonData.ranKey = Utils.randomString()
         GameController.commonData.ranKey = Utils.randomString()
         let data = {
         let data = {
-            "mac": "c1:65:e2:1c:b0:26,f6:60:e4:1a:b7:27",
-            "mac": "a5:65:e2:1c:b0:26,f6:60:e4:1a:b7:27",
+            "mac": "c1:65:e2:1c:b0:25,f6:60:e4:1a:b7:27",
             "psk": GameController.commonData.ranKey,
             "psk": GameController.commonData.ranKey,
             "appId": GameController.commonData.appid
             "appId": GameController.commonData.appid
         }
         }

Некоторые файлы не были показаны из-за большого количества измененных файлов