添加了结束战斗按钮

This commit is contained in:
2024-11-13 23:36:34 +08:00
parent 9d0ee7e7b5
commit 2a07f4718a
7 changed files with 966 additions and 383 deletions

View File

@@ -15,7 +15,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{720,148}</string> <string>{720,148}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{256,1},{720,148}}</string> <string>{{1,256},{720,148}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -30,9 +30,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{134,279}</string> <string>{134,279}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{359,353},{134,279}}</string> <string>{{723,256},{134,279}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <true/>
</dict> </dict>
<key>6_Collection_Detail_3_Rare.png</key> <key>6_Collection_Detail_3_Rare.png</key>
<dict> <dict>
@@ -45,7 +45,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{30,30}</string> <string>{30,30}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{978,1},{30,30}}</string> <string>{{1,1006},{30,30}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -60,7 +60,37 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{105,600}</string> <string>{105,600}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{256,151},{101,598}}</string> <string>{{1,406},{101,598}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>Icon_Close02.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{75,75}</string>
<key>spriteSourceSize</key>
<string>{75,75}</string>
<key>textureRect</key>
<string>{{928,846},{75,75}}</string>
<key>textureRotated</key>
<false/>
</dict>
<key>Icon_Pause.png</key>
<dict>
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<key>spriteSize</key>
<string>{61,64}</string>
<key>spriteSourceSize</key>
<string>{61,64}</string>
<key>textureRect</key>
<string>{{914,520},{61,64}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -75,9 +105,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{124,82}</string> <string>{124,82}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{453,868},{124,82}}</string> <string>{{895,595},{124,82}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <true/>
</dict> </dict>
<key>UI-074.png</key> <key>UI-074.png</key>
<dict> <dict>
@@ -90,7 +120,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{153,73}</string> <string>{153,73}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{384,952},{153,73}}</string> <string>{{759,520},{153,73}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -105,7 +135,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{406,200}</string> <string>{406,200}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{359,151},{406,200}}</string> <string>{{104,406},{406,200}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -120,7 +150,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{244,155}</string> <string>{244,155}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{495,353},{244,155}}</string> <string>{{104,859},{244,155}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -135,7 +165,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{581,647},{145,135}}</string> <string>{{350,907},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -150,7 +180,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{581,784},{145,135}}</string> <string>{{497,892},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -165,7 +195,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{245,135}</string> <string>{245,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{495,510},{245,135}}</string> <string>{{512,406},{245,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -180,7 +210,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{728,726},{145,135}}</string> <string>{{644,892},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -195,9 +225,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{875,726},{145,135}}</string> <string>{{748,595},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <false/>
</dict> </dict>
<key>frame7.png</key> <key>frame7.png</key>
<dict> <dict>
@@ -210,7 +240,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{728,863},{145,135}}</string> <string>{{748,732},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -225,7 +255,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{145,135}</string> <string>{145,135}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{875,873},{145,135}}</string> <string>{{791,869},{145,135}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <true/>
</dict> </dict>
@@ -240,9 +270,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{120,123}</string> <string>{120,123}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{579,921},{120,123}}</string> <string>{{895,721},{120,123}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <false/>
</dict> </dict>
<key>shop_product1.png</key> <key>shop_product1.png</key>
<dict> <dict>
@@ -255,9 +285,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{126,219}</string> <string>{126,219}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{256,751},{126,219}}</string> <string>{{759,392},{126,219}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <true/>
</dict> </dict>
<key>shop_product2.png</key> <key>shop_product2.png</key>
<dict> <dict>
@@ -270,7 +300,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{126,219}</string> <string>{126,219}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{742,470},{126,219}}</string> <string>{{512,543},{126,219}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <true/>
</dict> </dict>
@@ -285,9 +315,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{126,219}</string> <string>{126,219}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{742,598},{126,219}}</string> <string>{{492,671},{126,219}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <false/>
</dict> </dict>
<key>shop_product4.png</key> <key>shop_product4.png</key>
<dict> <dict>
@@ -300,7 +330,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{126,219}</string> <string>{126,219}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{453,647},{126,219}}</string> <string>{{620,671},{126,219}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<false/> <false/>
</dict> </dict>
@@ -315,9 +345,9 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{317,249}</string> <string>{317,249}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{767,151},{317,249}}</string> <string>{{104,608},{317,249}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <false/>
</dict> </dict>
<key>shop_title_bg.png</key> <key>shop_title_bg.png</key>
<dict> <dict>
@@ -330,7 +360,7 @@
<key>spriteSourceSize</key> <key>spriteSourceSize</key>
<string>{297,67}</string> <string>{297,67}</string>
<key>textureRect</key> <key>textureRect</key>
<string>{{384,634},{297,67}}</string> <string>{{423,608},{297,67}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <true/>
</dict> </dict>
@@ -347,7 +377,7 @@
<key>textureRect</key> <key>textureRect</key>
<string>{{1,1},{1020,253}}</string> <string>{{1,1},{1020,253}}</string>
<key>textureRotated</key> <key>textureRotated</key>
<true/> <false/>
</dict> </dict>
</dict> </dict>
<key>metadata</key> <key>metadata</key>
@@ -361,9 +391,9 @@
<key>realTextureFileName</key> <key>realTextureFileName</key>
<string>gui2.png</string> <string>gui2.png</string>
<key>size</key> <key>size</key>
<string>{1017,1042}</string> <string>{1022,1043}</string>
<key>smartupdate</key> <key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:a5befcd523e49a6354108518d6fb51cc:fc1fb1e1aaa8476e539fd55c26efa2e6:02d895b6f8eccee3d27099fa0f66bd83$</string> <string>$TexturePacker:SmartUpdate:9d5bdd87c3bf91d60747faff1ea9495f:76681c0714b9b68832b7b1d9be41ac21:02d895b6f8eccee3d27099fa0f66bd83$</string>
<key>textureFileName</key> <key>textureFileName</key>
<string>gui2.png</string> <string>gui2.png</string>
</dict> </dict>

View File

@@ -19,8 +19,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 1, "offsetY": 1,
"trimX": 256, "trimX": 1,
"trimY": 151, "trimY": 406,
"width": 101, "width": 101,
"height": 598, "height": 598,
"rawWidth": 105, "rawWidth": 105,
@@ -65,8 +65,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 453, "trimX": 620,
"trimY": 647, "trimY": 671,
"width": 126, "width": 126,
"height": 219, "height": 219,
"rawWidth": 126, "rawWidth": 126,
@@ -111,8 +111,8 @@
"rotated": true, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 875, "trimX": 791,
"trimY": 873, "trimY": 869,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -157,8 +157,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 256, "trimX": 1,
"trimY": 1, "trimY": 256,
"width": 720, "width": 720,
"height": 148, "height": 148,
"rawWidth": 720, "rawWidth": 720,
@@ -200,11 +200,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 359, "trimX": 723,
"trimY": 353, "trimY": 256,
"width": 134, "width": 134,
"height": 279, "height": 279,
"rawWidth": 134, "rawWidth": 134,
@@ -249,8 +249,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 978, "trimX": 1,
"trimY": 1, "trimY": 1006,
"width": 30, "width": 30,
"height": 30, "height": 30,
"rawWidth": 30, "rawWidth": 30,
@@ -283,6 +283,98 @@
], ],
"subMetas": {} "subMetas": {}
}, },
"7c79a": {
"importer": "sprite-frame",
"uuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9@7c79a",
"displayName": "",
"id": "7c79a",
"name": "Icon_Close02",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 928,
"trimY": 846,
"width": 75,
"height": 75,
"rawWidth": 75,
"rawHeight": 75,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b502af19-a87f-4a60-8218-986fe24f1d77@6c48a",
"atlasUuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"b4a38": {
"importer": "sprite-frame",
"uuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9@b4a38",
"displayName": "",
"id": "b4a38",
"name": "Icon_Pause",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 914,
"trimY": 520,
"width": 61,
"height": 64,
"rawWidth": 61,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [],
"indexes": [],
"uv": [],
"nuv": [],
"minPos": [],
"maxPos": []
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b502af19-a87f-4a60-8218-986fe24f1d77@6c48a",
"atlasUuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"c6846": { "c6846": {
"importer": "sprite-frame", "importer": "sprite-frame",
"uuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9@c6846", "uuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9@c6846",
@@ -292,11 +384,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 453, "trimX": 895,
"trimY": 868, "trimY": 595,
"width": 124, "width": 124,
"height": 82, "height": 82,
"rawWidth": 124, "rawWidth": 124,
@@ -341,8 +433,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 384, "trimX": 759,
"trimY": 952, "trimY": 520,
"width": 153, "width": 153,
"height": 73, "height": 73,
"rawWidth": 153, "rawWidth": 153,
@@ -387,8 +479,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 359, "trimX": 104,
"trimY": 151, "trimY": 406,
"width": 406, "width": 406,
"height": 200, "height": 200,
"rawWidth": 406, "rawWidth": 406,
@@ -433,8 +525,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 495, "trimX": 104,
"trimY": 353, "trimY": 859,
"width": 244, "width": 244,
"height": 155, "height": 155,
"rawWidth": 244, "rawWidth": 244,
@@ -479,8 +571,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 581, "trimX": 350,
"trimY": 647, "trimY": 907,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -525,8 +617,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 581, "trimX": 497,
"trimY": 784, "trimY": 892,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -571,8 +663,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 495, "trimX": 512,
"trimY": 510, "trimY": 406,
"width": 245, "width": 245,
"height": 135, "height": 135,
"rawWidth": 245, "rawWidth": 245,
@@ -617,8 +709,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 728, "trimX": 644,
"trimY": 726, "trimY": 892,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -660,11 +752,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": true, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 875, "trimX": 748,
"trimY": 726, "trimY": 595,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -709,8 +801,8 @@
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 728, "trimX": 748,
"trimY": 863, "trimY": 732,
"width": 145, "width": 145,
"height": 135, "height": 135,
"rawWidth": 145, "rawWidth": 145,
@@ -752,11 +844,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": true, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 579, "trimX": 895,
"trimY": 921, "trimY": 721,
"width": 120, "width": 120,
"height": 123, "height": 123,
"rawWidth": 120, "rawWidth": 120,
@@ -798,11 +890,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 256, "trimX": 759,
"trimY": 751, "trimY": 392,
"width": 126, "width": 126,
"height": 219, "height": 219,
"rawWidth": 126, "rawWidth": 126,
@@ -847,8 +939,8 @@
"rotated": true, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 742, "trimX": 512,
"trimY": 470, "trimY": 543,
"width": 126, "width": 126,
"height": 219, "height": 219,
"rawWidth": 126, "rawWidth": 126,
@@ -890,11 +982,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": true, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 742, "trimX": 492,
"trimY": 598, "trimY": 671,
"width": 126, "width": 126,
"height": 219, "height": 219,
"rawWidth": 126, "rawWidth": 126,
@@ -936,11 +1028,11 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": true, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 767, "trimX": 104,
"trimY": 151, "trimY": 608,
"width": 317, "width": 317,
"height": 249, "height": 249,
"rawWidth": 317, "rawWidth": 317,
@@ -985,8 +1077,8 @@
"rotated": true, "rotated": true,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 384, "trimX": 423,
"trimY": 634, "trimY": 608,
"width": 297, "width": 297,
"height": 67, "height": 67,
"rawWidth": 297, "rawWidth": 297,
@@ -1028,7 +1120,7 @@
"userData": { "userData": {
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": true, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 1, "trimX": 1,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -122,7 +122,7 @@ export class HeroViewComp extends CCComp {
this.sprite = this.node.getChildByName("anm").getComponent(Sprite); this.sprite = this.node.getChildByName("anm").getComponent(Sprite);
this.orginalFlashMaterial = this.sprite.getRenderMaterial(0); this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
// this.node.getChildByName("top").getChildByName("shield").active = false; // this.node.getChildByName("shielded").active = false;
// this.node.getChildByName("top").setScale(this.scale,1); // this.node.getChildByName("top").setScale(this.scale,1);
// this.node.getChildByName("atk").setScale(this.scale,1); // this.node.getChildByName("atk").setScale(this.scale,1);
// this.node.getChildByName("atk").getComponent(Label).string = this.atk.toString(); // this.node.getChildByName("atk").getComponent(Label).string = this.atk.toString();
@@ -160,6 +160,10 @@ export class HeroViewComp extends CCComp {
} }
if(this.shield > 0){ if(this.shield > 0){
this.shield -= 1 this.shield -= 1
if(this.shield <= 0){
this.shield = 0
this.node.getChildByName("shielded").active = false
}
return return
} }
let dodge = RandomManager.instance.getRandomInt(0,100,3) let dodge = RandomManager.instance.getRandomInt(0,100,3)
@@ -580,6 +584,9 @@ export class HeroViewComp extends CCComp {
add_shield(shield:number){ add_shield(shield:number){
this.shield =shield this.shield =shield
if(this.shield > 0){
this.node.getChildByName("shielded").active=true
}
} }
tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=60){ tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=60){

View File

@@ -190,6 +190,7 @@ export class CardControllerComp extends CCComp {
} }
} }
to_mission(){ to_mission(){
oops.message.dispatchEvent("mission_end")
this.node.getChildByName("mission_home").active=true this.node.getChildByName("mission_home").active=true
this.node.getChildByName("mission").active=false this.node.getChildByName("mission").active=false
this.node.getChildByName("bar").active=true; this.node.getChildByName("bar").active=true;

View File

@@ -16,6 +16,7 @@ import { MonModelComp } from "../mon/MonModelComp";
import { Boss} from "../Boss/Boss"; import { Boss} from "../Boss/Boss";
import { UIID } from "../common/config/GameUIConfig"; import { UIID } from "../common/config/GameUIConfig";
import { Talents } from "../common/config/TalentSet"; import { Talents } from "../common/config/TalentSet";
import { HeroViewComp } from "../hero/HeroViewComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** 视图层对象 */ /** 视图层对象 */
@@ -59,6 +60,7 @@ export class MapMonsterComp extends CCComp {
oops.message.on("other_add_monster", this.on_other_add_monster, this); oops.message.on("other_add_monster", this.on_other_add_monster, this);
oops.message.on("do_add_hero", this.on_do_add_hero, this); oops.message.on("do_add_hero", this.on_do_add_hero, this);
oops.message.on("mission_start", this.mission_start, this); oops.message.on("mission_start", this.mission_start, this);
oops.message.on("mission_end", this.mission_end, this);
oops.message.on("normal_call", this.on_normal_call, this); oops.message.on("normal_call", this.on_normal_call, this);
oops.message.on("better_call", this.on_better_call, this); oops.message.on("better_call", this.on_better_call, this);
oops.message.on("mon_dead", this.on_mon_dead, this); oops.message.on("mon_dead", this.on_mon_dead, this);
@@ -123,6 +125,13 @@ export class MapMonsterComp extends CCComp {
this.hero_index=0 this.hero_index=0
smc.vm_data.mission.coin = 0 smc.vm_data.mission.coin = 0
} }
mission_end(){
smc.vm_data.mission.play=false
let heros:any= ecs.query(ecs.allOf(HeroViewComp));
for(let i=0;i<heros.length;i++){
heros[i].HeroView.ent.destroy()
}
}
on_mon_dead(){ on_mon_dead(){
let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0) let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0)
smc.vm_data.mission.coin += parseFloat(coin) smc.vm_data.mission.coin += parseFloat(coin)