装备 需要完善

This commit is contained in:
2025-07-02 17:45:00 +08:00
parent ebeb5ea04b
commit 11e6ecdf48
9 changed files with 1492 additions and 1332 deletions

View File

@@ -71,15 +71,26 @@ export class CardsCompComp extends CCComp {
this.card3c.hero_skill_select(list[2],data)
// this.card4c.hero_skill_select(list[3])
}
equip_select(){
let list=getRandomCardsByType(cardType.EQUIP,3)
equip_select(data:any){
let list=[]
switch(data.slot){
case "weapon":
list=getRandomCardsByType(cardType.EQUIP,3)
break
case "armor":
list=getRandomCardsByType(cardType.EQUIP,3)
break
case "accessory":
list=getRandomCardsByType(cardType.EQUIP,3)
break
}
console.log("[CardsComp]:装备选择卡牌列表",list)
this.card1c.equip_select(list[0])
this.card2c.equip_select(list[1])
this.card3c.equip_select(list[2])
this.card1c.equip_select(list[0],data)
this.card2c.equip_select(list[1],data)
this.card3c.equip_select(list[2],data)
// this.card4c.equip_select(list[3])
}
func_select(){
func_select(){
let list=getRandomCardsByType(cardType.SPECIAL,3)
console.log("[CardsComp]:功能选择卡牌列表",list)
this.card1c.func_select(list[0])
@@ -132,7 +143,7 @@ export class CardsCompComp extends CCComp {
case GameEvent.EquipSelect:
console.log("[CardsComp]:显示装备选择卡牌")
this.node.getChildByName("btns").getChildByName("cancel").active=true
this.equip_select()
this.equip_select(data)
break
}