This commit is contained in:
2025-08-05 17:25:34 +08:00
parent 3db3cc78eb
commit 6f9529ada2
20 changed files with 3120 additions and 1623 deletions

View File

@@ -28,7 +28,6 @@ export class CardComp extends CCComp {
skill_slot:string="skill1"
equip_slot:string="weapon"
talent_slot:string="tal1"
is_master:boolean=false;
enhancement_data:any=null;
onLoad(){
// this.on(GameEvent.HeroSelect,this.hero_select,this)
@@ -54,11 +53,10 @@ export class CardComp extends CCComp {
this.node.getChildByName("Button").active=true
}, 0.1);
}
hero_select(args: any,is_master:boolean=false){
hero_select(args: any){
this.c_type=cardType.HERO
this.c_uuid=args.uuid
this.is_master=is_master
this.show_hero(this.c_uuid,is_master)
this.show_hero(this.c_uuid)
this.node.getChildByName("show").active=false
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
this.scheduleOnce(() => {
@@ -153,7 +151,7 @@ export class CardComp extends CCComp {
show.getChildByName("info").getComponent(Label).string=SkillSet[uuid].info
}
show_hero(uuid:number,is_master:boolean=false){
show_hero(uuid:number){
let show=this.node.getChildByName("show")
show.getChildByName("name").getChildByName("name").getComponent(Label).string=HeroInfo[uuid].name
this.do_card_bg_show(HeroInfo[uuid].quality)
@@ -304,7 +302,7 @@ export class CardComp extends CCComp {
use_card(){
switch(this.c_type){
case cardType.HERO:
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid,is_master:this.is_master})
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid})
oops.message.dispatchEvent(GameEvent.CardsClose)
break
case cardType.SKILL: