添加了结束战斗按钮

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

View File

@@ -19,8 +19,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 1,
"trimX": 256,
"trimY": 151,
"trimX": 1,
"trimY": 406,
"width": 101,
"height": 598,
"rawWidth": 105,
@@ -65,8 +65,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 453,
"trimY": 647,
"trimX": 620,
"trimY": 671,
"width": 126,
"height": 219,
"rawWidth": 126,
@@ -111,8 +111,8 @@
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 875,
"trimY": 873,
"trimX": 791,
"trimY": 869,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -157,8 +157,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 256,
"trimY": 1,
"trimX": 1,
"trimY": 256,
"width": 720,
"height": 148,
"rawWidth": 720,
@@ -200,11 +200,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 359,
"trimY": 353,
"trimX": 723,
"trimY": 256,
"width": 134,
"height": 279,
"rawWidth": 134,
@@ -249,8 +249,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 978,
"trimY": 1,
"trimX": 1,
"trimY": 1006,
"width": 30,
"height": 30,
"rawWidth": 30,
@@ -283,6 +283,98 @@
],
"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": {
"importer": "sprite-frame",
"uuid": "8e53e122-d71b-440a-bb07-9938dd6c20d9@c6846",
@@ -292,11 +384,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 453,
"trimY": 868,
"trimX": 895,
"trimY": 595,
"width": 124,
"height": 82,
"rawWidth": 124,
@@ -341,8 +433,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 384,
"trimY": 952,
"trimX": 759,
"trimY": 520,
"width": 153,
"height": 73,
"rawWidth": 153,
@@ -387,8 +479,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 359,
"trimY": 151,
"trimX": 104,
"trimY": 406,
"width": 406,
"height": 200,
"rawWidth": 406,
@@ -433,8 +525,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 495,
"trimY": 353,
"trimX": 104,
"trimY": 859,
"width": 244,
"height": 155,
"rawWidth": 244,
@@ -479,8 +571,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 581,
"trimY": 647,
"trimX": 350,
"trimY": 907,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -525,8 +617,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 581,
"trimY": 784,
"trimX": 497,
"trimY": 892,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -571,8 +663,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 495,
"trimY": 510,
"trimX": 512,
"trimY": 406,
"width": 245,
"height": 135,
"rawWidth": 245,
@@ -617,8 +709,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 728,
"trimY": 726,
"trimX": 644,
"trimY": 892,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -660,11 +752,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 875,
"trimY": 726,
"trimX": 748,
"trimY": 595,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -709,8 +801,8 @@
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 728,
"trimY": 863,
"trimX": 748,
"trimY": 732,
"width": 145,
"height": 135,
"rawWidth": 145,
@@ -752,11 +844,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 579,
"trimY": 921,
"trimX": 895,
"trimY": 721,
"width": 120,
"height": 123,
"rawWidth": 120,
@@ -798,11 +890,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 256,
"trimY": 751,
"trimX": 759,
"trimY": 392,
"width": 126,
"height": 219,
"rawWidth": 126,
@@ -847,8 +939,8 @@
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 742,
"trimY": 470,
"trimX": 512,
"trimY": 543,
"width": 126,
"height": 219,
"rawWidth": 126,
@@ -890,11 +982,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 742,
"trimY": 598,
"trimX": 492,
"trimY": 671,
"width": 126,
"height": 219,
"rawWidth": 126,
@@ -936,11 +1028,11 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 767,
"trimY": 151,
"trimX": 104,
"trimY": 608,
"width": 317,
"height": 249,
"rawWidth": 317,
@@ -985,8 +1077,8 @@
"rotated": true,
"offsetX": 0,
"offsetY": 0,
"trimX": 384,
"trimY": 634,
"trimX": 423,
"trimY": 608,
"width": 297,
"height": 67,
"rawWidth": 297,
@@ -1028,7 +1120,7 @@
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": true,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"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.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("atk").setScale(this.scale,1);
// this.node.getChildByName("atk").getComponent(Label).string = this.atk.toString();
@@ -160,6 +160,10 @@ export class HeroViewComp extends CCComp {
}
if(this.shield > 0){
this.shield -= 1
if(this.shield <= 0){
this.shield = 0
this.node.getChildByName("shielded").active = false
}
return
}
let dodge = RandomManager.instance.getRandomInt(0,100,3)
@@ -580,6 +584,9 @@ export class HeroViewComp extends CCComp {
add_shield(shield:number){
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){

View File

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

View File

@@ -16,6 +16,7 @@ import { MonModelComp } from "../mon/MonModelComp";
import { Boss} from "../Boss/Boss";
import { UIID } from "../common/config/GameUIConfig";
import { Talents } from "../common/config/TalentSet";
import { HeroViewComp } from "../hero/HeroViewComp";
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("do_add_hero", this.on_do_add_hero, 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("better_call", this.on_better_call, this);
oops.message.on("mon_dead", this.on_mon_dead, this);
@@ -123,6 +125,13 @@ export class MapMonsterComp extends CCComp {
this.hero_index=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(){
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)