Browse Source

Merge branch 'master' of http://git.mokasz.com/zouyong/tower_sanguo

zhengniehua 5 years ago
parent
commit
6c6ebb2c70

+ 7 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "fd7b1074-82fb-44f0-94be-3f43178e88bf",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 27 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.atlas

@@ -0,0 +1,27 @@
+
+hongbao.png
+size: 211,89
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+hongbao
+  rotate: false
+  xy: 166, 27
+  size: 43, 60
+  orig: 43, 60
+  offset: 0, 0
+  index: -1
+icon5
+  rotate: false
+  xy: 2, 2
+  size: 85, 85
+  orig: 85, 85
+  offset: 0, 0
+  index: -1
+star
+  rotate: true
+  xy: 89, 8
+  size: 79, 75
+  orig: 81, 77
+  offset: 1, 1
+  index: -1

+ 5 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.atlas.meta

@@ -0,0 +1,5 @@
+{
+  "ver": "1.0.1",
+  "uuid": "19e8efd4-0f26-483a-97f8-dfb93c285fa0",
+  "subMetas": {}
+}

+ 252 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.json

@@ -0,0 +1,252 @@
+{
+"skeleton": {
+	"hash": "OSlvn98hFiTzE4ZMHFb+c5l801Q",
+	"spine": "3.8.99",
+	"x": -42.5,
+	"y": -42.5,
+	"width": 85,
+	"height": 85,
+	"images": "",
+	"audio": ""
+},
+"bones": [
+	{ "name": "root" },
+	{ "name": "icon5", "parent": "root", "x": -0.07, "y": -29.36 },
+	{ "name": "hongbao", "parent": "icon5", "length": 31.23, "rotation": 87.61, "x": -0.28, "y": 1.35 },
+	{ "name": "bone", "parent": "root", "x": -0.93, "y": -49.99 },
+	{ "name": "star", "parent": "bone", "x": 0.68, "y": 54.45 },
+	{ "name": "star2", "parent": "bone", "x": 0.68, "y": 54.45 },
+	{ "name": "star3", "parent": "bone", "x": 0.68, "y": 54.45 },
+	{ "name": "star4", "parent": "bone", "x": 0.68, "y": 54.45 },
+	{ "name": "star5", "parent": "bone", "x": 0.68, "y": 54.45 },
+	{ "name": "star6", "parent": "bone", "x": 0.68, "y": 54.45 }
+],
+"slots": [
+	{ "name": "icon5", "bone": "icon5", "attachment": "icon5" },
+	{ "name": "star", "bone": "star", "attachment": "star" },
+	{ "name": "star2", "bone": "star2", "attachment": "star" },
+	{ "name": "star3", "bone": "star3", "attachment": "star" },
+	{ "name": "star4", "bone": "star4", "attachment": "star" },
+	{ "name": "star5", "bone": "star5", "attachment": "star" },
+	{ "name": "star6", "bone": "star6", "attachment": "star" },
+	{ "name": "hongbao", "bone": "hongbao", "attachment": "hongbao" }
+],
+"skins": [
+	{
+		"name": "default",
+		"attachments": {
+			"hongbao": {
+				"hongbao": { "x": 28.84, "y": 0.5, "rotation": -87.61, "width": 43, "height": 60 }
+			},
+			"icon5": {
+				"icon5": { "x": 0.07, "y": 29.36, "width": 85, "height": 85 }
+			},
+			"star": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			},
+			"star2": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			},
+			"star3": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			},
+			"star4": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			},
+			"star5": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			},
+			"star6": {
+				"star": { "x": 0.03, "y": 0.94, "scaleX": 0.2128, "scaleY": 0.2128, "width": 81, "height": 77 }
+			}
+		}
+	}
+],
+"animations": {
+	"animation": {
+		"slots": {
+			"star": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			},
+			"star2": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			},
+			"star3": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			},
+			"star4": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			},
+			"star5": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			},
+			"star6": {
+				"color": [
+					{ "time": 0.9667, "color": "ffffffff" },
+					{ "time": 1.0667, "color": "ffffff00" }
+				],
+				"attachment": [
+					{ "time": 0.7333, "name": null },
+					{ "time": 0.7667, "name": "star" }
+				]
+			}
+		},
+		"bones": {
+			"hongbao": {
+				"rotate": [
+					{},
+					{ "time": 0.1, "angle": -12.81 },
+					{ "time": 0.2333, "angle": 18.37 },
+					{ "time": 0.3667, "angle": -14.87 },
+					{ "time": 0.4667, "curve": "stepped" },
+					{ "time": 0.6667, "curve": "stepped" },
+					{ "time": 0.7667, "curve": "stepped" },
+					{ "time": 0.8667, "curve": "stepped" },
+					{ "time": 0.9667, "curve": "stepped" },
+					{ "time": 1.0333, "curve": "stepped" },
+					{ "time": 1.1 }
+				],
+				"translate": [
+					{ "curve": "stepped" },
+					{ "time": 0.1, "curve": "stepped" },
+					{ "time": 0.2333, "curve": "stepped" },
+					{ "time": 0.3667, "curve": "stepped" },
+					{ "time": 0.4667, "curve": "stepped" },
+					{ "time": 0.6667, "curve": "stepped" },
+					{ "time": 0.7667 },
+					{ "time": 0.8667, "y": 9.33 },
+					{ "time": 0.9667, "curve": "stepped" },
+					{ "time": 1.0333, "curve": "stepped" },
+					{ "time": 1.1 }
+				],
+				"scale": [
+					{ "curve": "stepped" },
+					{ "time": 0.1, "curve": "stepped" },
+					{ "time": 0.2333, "curve": "stepped" },
+					{ "time": 0.3667, "curve": "stepped" },
+					{ "time": 0.4667, "curve": "stepped" },
+					{ "time": 0.6667 },
+					{ "time": 0.7667, "x": 0.824 },
+					{ "time": 0.8667, "curve": "stepped" },
+					{ "time": 0.9667 },
+					{ "time": 1.0333, "x": 0.917 },
+					{ "time": 1.1 }
+				]
+			},
+			"star": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": 47.2, "y": 13.8 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			},
+			"star3": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": -32.8, "y": -11.8 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			},
+			"star4": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": -20.4, "y": -35.2 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			},
+			"star5": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": -29.6, "y": 27.8 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			},
+			"star6": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": 37, "y": -19 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			},
+			"star2": {
+				"rotate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "angle": -103.23 }
+				],
+				"translate": [
+					{ "time": 0.7333 },
+					{ "time": 1.0667, "x": 21, "y": 32.8 }
+				],
+				"scale": [
+					{ "time": 0.7333 }
+				]
+			}
+		}
+	}
+}
+}

+ 9 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.json.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.3",
+  "uuid": "d9beec46-09c6-4b0e-85b5-627c9837b1b2",
+  "textures": [
+    "1a2a1a1b-33f2-46e4-bf98-388c7da8cd88"
+  ],
+  "scale": 1,
+  "subMetas": {}
+}

BIN
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.png


+ 36 - 0
tower_sanguo/assets/resources/module/checkpointRedBag/spine/hongbao.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.4",
+  "uuid": "1a2a1a1b-33f2-46e4-bf98-388c7da8cd88",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 211,
+  "height": 89,
+  "platformSettings": {},
+  "subMetas": {
+    "hongbao": {
+      "ver": "1.0.4",
+      "uuid": "c050a184-0a24-461c-b900-31f6b436514f",
+      "rawTextureUuid": "1a2a1a1b-33f2-46e4-bf98-388c7da8cd88",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 2,
+      "trimY": 2,
+      "width": 207,
+      "height": 85,
+      "rawWidth": 211,
+      "rawHeight": 89,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

File diff suppressed because it is too large
+ 462 - 132
tower_sanguo/assets/resources/module/fight/fight.prefab


File diff suppressed because it is too large
+ 204 - 371
tower_sanguo/assets/resources/module/main/main.prefab


+ 6 - 0
tower_sanguo/assets/scripts/module/main/MainUI.ts

@@ -115,10 +115,16 @@ export default class MainUI extends BaseUI {
     qipao_marshal: cc.Node = null;
     @property({ type: cc.Button, displayName: "训练按钮" })
     btn3: cc.Button = null;
+    @property({ type: cc.Button, displayName: "抽卡按钮" })
+    btn_5: cc.Button = null;
     @property({ type: cc.Sprite, displayName: "货币-红包" })
     node_hb: cc.Sprite = null;
     @property({ type: cc.Sprite, displayName: "货币-粮草" })
     node_lc: cc.Sprite = null;
+    @property({ type: cc.Sprite, displayName: "货币-元宝", tooltip: "飞道具用到" })
+    node_yb: cc.Sprite = null;
+    @property({ type: cc.Sprite, displayName: "货币-威望", tooltip: "飞道具用到" })
+    node_ww: cc.Sprite = null;
     @property({ type: cc.Button, displayName: "领取粮草按钮" })
     btn3_1: cc.Button = null;
     @property({ type: cc.Sprite, displayName: "spr粮草获取进度" })

+ 54 - 0
tower_sanguo/assets/scripts/module/result/ResultUI.ts

@@ -142,8 +142,62 @@ export default class ResultUI extends BaseUI {
         let gap = this.life_time - this.cur_time;
         this.txt_time.string = gap + '秒后自动关闭';
     }
+    /** 飞item动画 */
+    private flyNode() {
+        let comp_main = GameController.mainui;
+        // 找出需要飞item的id
+        let arr_item = [];
+        for (let i = 0; i < this.ui_data.icon_data.length; i++) {
+            if (this.ui_data.icon_data[i].id <= 5) {
+                let item_id = parseInt(this.ui_data.icon_data[i].id);
+                arr_item.push(item_id);
+            }
+        }
+        const i_count = arr_item.length;
+        for (let i = 0; i < i_count; i++) {
+            let end_node = null;
+            let node_name = 'node_lc';
+            let _sf_data = comp_main.node_lc.spriteFrame;
+            if (arr_item[i] === 1) {// 粮草
+                node_name = 'node_lc';
+                end_node = comp_main.btn_3.node;
+            } else if (arr_item[i] === 2) {// 元宝
+                node_name = 'node_yb';
+                end_node = comp_main.btn_5.node;
+            } else if (arr_item[i] === 3) {// 红包币
+                node_name = 'node_hb';
+            } else if (arr_item[i] === 4) {// 威望
+                node_name = 'node_ww';
+            }
+            _sf_data = comp_main[node_name].spriteFrame;
+            this.scheduleOnce(() => {
+                let start_node_pos = new cc.Vec2(0, -300);
+                let target_node = end_node || comp_main[node_name].node;
+                let end_world_pos = target_node.parent.convertToWorldSpaceAR(target_node.getPosition());
+                if (arr_item[i] === 1) {
+                    end_world_pos.y += target_node.height / 2;
+                }
+                let end_node_pos = comp_main.node.convertToNodeSpaceAR(end_world_pos);
+                let fly_data = {
+                    node_p: comp_main.node,
+                    item_count: 10,
+                    item_scale: [1, 2],
+                    item_sf: _sf_data,
+                    start_pos: start_node_pos,
+                    end_pos: end_node_pos,
+                    complete_call: () => {
+                    },
+                }
+                // 发起飞item事件
+                comp_main.node.emit('ui-fly-node', fly_data);
+            }, i * 1)
+        }
+    }
     onDestroy() {
         if (this.ui_data.close_call) this.ui_data.close_call();
+        if (this.ui_data.result_state) {
+            this.flyNode();
+        }
         super.onDestroy();
     }
     // update (dt) {}

Some files were not shown because too many files changed in this diff