From 176bdbc811438e00c0ace6cda375a8472b72d6e2 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 14 May 2025 10:11:51 +0800 Subject: [PATCH] dd --- assets/resources/gui/role_controller.prefab | 8 +++++++- assets/script/game/common/config/GameEvent.ts | 4 ++-- assets/script/game/common/config/MissionSet.ts | 7 +++++++ assets/script/game/hero/HeroInfoComp.ts | 4 ++-- assets/script/game/map/CardComp.ts | 4 ++-- assets/script/game/map/MissionHeroComp.ts | 6 ++++-- 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index b7b25e83..b4b55879 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -12486,7 +12486,7 @@ "__id__": 576 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 625 @@ -12963,6 +12963,8 @@ "__id__": 0 }, "fileId": "acGmsQC1VKwIkgbQq7vGgw", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -13088,6 +13090,8 @@ "__id__": 0 }, "fileId": "b1Vuz6g0VExLdtTXuyJVHm", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -13778,6 +13782,8 @@ "__id__": 0 }, "fileId": "3cfPMWZFNEH6gwUOeGmfV5", + "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index 6dea2691..eb083609 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -17,8 +17,8 @@ export enum GameEvent { CastSkill = "CastSkill", CardRefresh = "CardRefresh", UseCard = "UseCard", - UserHeroCard = "UserHeroCard", - UserSkillCard = "UserSkillCard", + UseHeroCard = "UseHeroCard", + UseSkillCard = "UseSkillCard", CallHero = "CallHero", MissionSkill = "MissionSkill", diff --git a/assets/script/game/common/config/MissionSet.ts b/assets/script/game/common/config/MissionSet.ts index ee34ab12..8c94f9af 100644 --- a/assets/script/game/common/config/MissionSet.ts +++ b/assets/script/game/common/config/MissionSet.ts @@ -45,3 +45,10 @@ export const MBSet = { crit_cost:2, dodge_cost:2, } +export const MissStatus = { + ready:0, + playing:1, + pause:2, + choose:3, + end:4, +} diff --git a/assets/script/game/hero/HeroInfoComp.ts b/assets/script/game/hero/HeroInfoComp.ts index 9020ea55..7172be87 100644 --- a/assets/script/game/hero/HeroInfoComp.ts +++ b/assets/script/game/hero/HeroInfoComp.ts @@ -13,9 +13,9 @@ const { ccclass, property } = _decorator; @ccclass('HeroInfoCompComp') @ecs.register('HeroInfoComp', false) export class HeroInfoCompComp extends CCComp { - @property(Number) + @property c_id:number=0 - @property(Boolean) + @property is_Change:boolean=false has_hero:boolean=false diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index a0d9fab4..55a78c8b 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -75,10 +75,10 @@ export class CardComp extends CCComp { if(this.is_used) return switch(this.c_type){ case 0: - oops.message.dispatchEvent(GameEvent.UserHeroCard,{uuid:this.c_uuid}) + oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid}) break case 1: - oops.message.dispatchEvent(GameEvent.UserSkillCard,{uuid:this.c_uuid}) + oops.message.dispatchEvent(GameEvent.UseSkillCard,{uuid:this.c_uuid}) break case 2: oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid}) diff --git a/assets/script/game/map/MissionHeroComp.ts b/assets/script/game/map/MissionHeroComp.ts index 68068a43..81d6226b 100644 --- a/assets/script/game/map/MissionHeroComp.ts +++ b/assets/script/game/map/MissionHeroComp.ts @@ -24,7 +24,7 @@ export class MissionHeroCompComp extends CCComp { 2:{pos:v3(-270,65,0),has:false}, } onLoad(){ - this.on(GameEvent.UserHeroCard,this.call_hero,this) + this.on(GameEvent.UseHeroCard,this.show_heros_pos,this) } start() { // this.test_call() @@ -41,7 +41,9 @@ export class MissionHeroCompComp extends CCComp { test_call(){ this.addHero(5010) } - + show_heros_pos(){ + this.node.getChildByName("herospos").active=true + } call_hero(event: string, args: any){ this.timer.reset() let hero_list =HeroList