This commit is contained in:
2025-05-14 10:11:51 +08:00
parent 476be36a03
commit 176bdbc811
6 changed files with 24 additions and 9 deletions

View File

@@ -12486,7 +12486,7 @@
"__id__": 576 "__id__": 576
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 625 "__id__": 625
@@ -12963,6 +12963,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "acGmsQC1VKwIkgbQq7vGgw", "fileId": "acGmsQC1VKwIkgbQq7vGgw",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -13088,6 +13090,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "b1Vuz6g0VExLdtTXuyJVHm", "fileId": "b1Vuz6g0VExLdtTXuyJVHm",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -13778,6 +13782,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "3cfPMWZFNEH6gwUOeGmfV5", "fileId": "3cfPMWZFNEH6gwUOeGmfV5",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {

View File

@@ -17,8 +17,8 @@ export enum GameEvent {
CastSkill = "CastSkill", CastSkill = "CastSkill",
CardRefresh = "CardRefresh", CardRefresh = "CardRefresh",
UseCard = "UseCard", UseCard = "UseCard",
UserHeroCard = "UserHeroCard", UseHeroCard = "UseHeroCard",
UserSkillCard = "UserSkillCard", UseSkillCard = "UseSkillCard",
CallHero = "CallHero", CallHero = "CallHero",
MissionSkill = "MissionSkill", MissionSkill = "MissionSkill",

View File

@@ -45,3 +45,10 @@ export const MBSet = {
crit_cost:2, crit_cost:2,
dodge_cost:2, dodge_cost:2,
} }
export const MissStatus = {
ready:0,
playing:1,
pause:2,
choose:3,
end:4,
}

View File

@@ -13,9 +13,9 @@ const { ccclass, property } = _decorator;
@ccclass('HeroInfoCompComp') @ccclass('HeroInfoCompComp')
@ecs.register('HeroInfoComp', false) @ecs.register('HeroInfoComp', false)
export class HeroInfoCompComp extends CCComp { export class HeroInfoCompComp extends CCComp {
@property(Number) @property
c_id:number=0 c_id:number=0
@property(Boolean) @property
is_Change:boolean=false is_Change:boolean=false
has_hero:boolean=false has_hero:boolean=false

View File

@@ -75,10 +75,10 @@ export class CardComp extends CCComp {
if(this.is_used) return if(this.is_used) return
switch(this.c_type){ switch(this.c_type){
case 0: case 0:
oops.message.dispatchEvent(GameEvent.UserHeroCard,{uuid:this.c_uuid}) oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid})
break break
case 1: case 1:
oops.message.dispatchEvent(GameEvent.UserSkillCard,{uuid:this.c_uuid}) oops.message.dispatchEvent(GameEvent.UseSkillCard,{uuid:this.c_uuid})
break break
case 2: case 2:
oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid}) oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid})

View File

@@ -24,7 +24,7 @@ export class MissionHeroCompComp extends CCComp {
2:{pos:v3(-270,65,0),has:false}, 2:{pos:v3(-270,65,0),has:false},
} }
onLoad(){ onLoad(){
this.on(GameEvent.UserHeroCard,this.call_hero,this) this.on(GameEvent.UseHeroCard,this.show_heros_pos,this)
} }
start() { start() {
// this.test_call() // this.test_call()
@@ -41,7 +41,9 @@ export class MissionHeroCompComp extends CCComp {
test_call(){ test_call(){
this.addHero(5010) this.addHero(5010)
} }
show_heros_pos(){
this.node.getChildByName("herospos").active=true
}
call_hero(event: string, args: any){ call_hero(event: string, args: any){
this.timer.reset() this.timer.reset()
let hero_list =HeroList let hero_list =HeroList