This commit is contained in:
2025-07-28 14:17:56 +08:00
parent 48eaa6d1ad
commit 953ae2e0f9
10 changed files with 734 additions and 178 deletions

View File

@@ -13,6 +13,7 @@ import { cardType, getRandomCardUUID, Quality, SuperCards } from "../common/conf
import { EquipInfo, EquipType } from "../common/config/Equips";
import { FightSet } from "../common/config/Mission";
import { EnhancementOptions } from "../common/config/LevelUp";
import { TalentList } from "../common/config/TalentSet";
const { ccclass, property } = _decorator;
@@ -40,6 +41,13 @@ export class CardComp extends CCComp {
this.node.getChildByName("Button").active=false
this.node.getChildByName("show").active=false
}
talent_select(args: any){
this.c_type=cardType.TALENT
this.c_uuid=args.uuid
this.node.getChildByName("show").active=false
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
this.show_talent(this.c_uuid)
}
hero_select(args: any,is_master:boolean=false){
console.log("[cardcomp]:card hero_select",args,is_master)
this.c_type=cardType.HERO
@@ -114,7 +122,11 @@ export class CardComp extends CCComp {
break
}
}
show_talent(uuid:number){
let show=this.node.getChildByName("show")
show.getChildByName("name").getChildByName("name").getComponent(Label).string=TalentList[uuid].name
this.do_card_bg_show(TalentList[uuid].quality)
}
show_skill(uuid:number,data:any){
let show=this.node.getChildByName("show")
show.getChildByName("name").getChildByName("name").getComponent(Label).string=SkillSet[uuid].name

View File

@@ -92,11 +92,24 @@ export class CardsCompComp extends CCComp {
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择强化"
this.enhancement_select()
break
case GameEvent.TalentSelect:
console.log("[CardsComp]:显示天赋选择卡牌")
this.node.getChildByName("btns").getChildByName("cancel").active=true
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择天赋"
this.talent_select()
break
}
if(!is_refresh) this.show()
}
talent_select(){
let list=getRandomCardsByType(cardType.TALENT,3,Quality.GREEN)
console.log("[CardsComp]:天赋选择卡牌列表",list)
this.card1c.talent_select(list[0])
this.card2c.talent_select(list[1])
this.card3c.talent_select(list[2])
}
enhancement_select(){
let list=getEnhancement(smc.enhancements,3)
console.log("[CardsComp]:强化选择卡牌列表",smc.enhancements,list)

View File

@@ -113,7 +113,6 @@ export class EquipSkillComp extends CCComp {
do_skill(uuid:number){
console.log("出发技能:",uuid)
oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid)
}