天赋触发和 ui制作完成
This commit is contained in:
@@ -47,6 +47,7 @@ export class CardsCompComp extends CCComp {
|
||||
this.on(GameEvent.CardsClose, this.close_cards, this);
|
||||
this.on(GameEvent.EquipSelect, this.addToQueue, this);
|
||||
this.on(GameEvent.EnhancementSelect, this.addToQueue, this);
|
||||
this.on(GameEvent.TalentSelect, this.addToQueue, this);
|
||||
this.card1=this.node.getChildByName("cards").getChildByName("card1")
|
||||
this.card2=this.node.getChildByName("cards").getChildByName("card2")
|
||||
this.card3=this.node.getChildByName("cards").getChildByName("card3")
|
||||
@@ -96,19 +97,19 @@ export class CardsCompComp extends CCComp {
|
||||
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()
|
||||
this.talent_select(data)
|
||||
break
|
||||
}
|
||||
|
||||
if(!is_refresh) this.show()
|
||||
|
||||
}
|
||||
talent_select(){
|
||||
talent_select(data:any){
|
||||
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])
|
||||
this.card1c.talent_select(list[0],data)
|
||||
this.card2c.talent_select(list[1],data)
|
||||
this.card3c.talent_select(list[2],data)
|
||||
}
|
||||
enhancement_select(){
|
||||
let list=getEnhancement(smc.enhancements,3)
|
||||
|
||||
Reference in New Issue
Block a user