卡牌调整为3张
This commit is contained in:
@@ -15,11 +15,11 @@ export class CardsCompComp extends CCComp {
|
||||
card1:any=null
|
||||
card2:any=null
|
||||
card3:any=null
|
||||
card4:any=null
|
||||
// card4:any=null
|
||||
card1c:CardComp=null
|
||||
card2c:CardComp=null
|
||||
card3c:CardComp=null
|
||||
card4c:CardComp=null
|
||||
// card4c:CardComp=null
|
||||
|
||||
/** 卡牌展示队列 */
|
||||
private cardQueue: Array<{type: GameEvent, data?: any}> = [];
|
||||
@@ -39,52 +39,52 @@ export class CardsCompComp extends CCComp {
|
||||
this.card1=this.node.getChildByName("card1")
|
||||
this.card2=this.node.getChildByName("card2")
|
||||
this.card3=this.node.getChildByName("card3")
|
||||
this.card4=this.node.getChildByName("card4")
|
||||
// this.card4=this.node.getChildByName("card4")
|
||||
this.card1c=this.card1.getComponent(CardComp)
|
||||
this.card2c=this.card2.getComponent(CardComp)
|
||||
this.card3c=this.card3.getComponent(CardComp)
|
||||
this.card4c=this.card4.getComponent(CardComp)
|
||||
// this.card4c=this.card4.getComponent(CardComp)
|
||||
|
||||
|
||||
}
|
||||
hero_select(){
|
||||
let list=getRandomCardsByType(cardType.HERO,4)
|
||||
let list=getRandomCardsByType(cardType.HERO,3)
|
||||
console.log("[CardsComp]:英雄选择卡牌列表",list)
|
||||
this.card1c.hero_select(list[0])
|
||||
this.card2c.hero_select(list[1])
|
||||
this.card3c.hero_select(list[2])
|
||||
this.card4c.hero_select(list[3])
|
||||
// this.card4c.hero_select(list[3])
|
||||
}
|
||||
|
||||
hero_skill_select(){
|
||||
let list=getRandomCardsByType(cardType.SKILL,4)
|
||||
let list=getRandomCardsByType(cardType.SKILL,3)
|
||||
console.log("[CardsComp]:技能选择卡牌列表",list)
|
||||
this.card1c.hero_skill_select(list[0])
|
||||
this.card2c.hero_skill_select(list[1])
|
||||
this.card3c.hero_skill_select(list[2])
|
||||
this.card4c.hero_skill_select(list[3])
|
||||
// this.card4c.hero_skill_select(list[3])
|
||||
}
|
||||
equip_select(){
|
||||
let list=getRandomCardsByType(cardType.EQUIP,4)
|
||||
let list=getRandomCardsByType(cardType.EQUIP,3)
|
||||
console.log("[CardsComp]:装备选择卡牌列表",list)
|
||||
this.card1c.equip_select(list[0])
|
||||
this.card2c.equip_select(list[1])
|
||||
this.card3c.equip_select(list[2])
|
||||
this.card4c.equip_select(list[3])
|
||||
// this.card4c.equip_select(list[3])
|
||||
}
|
||||
func_select(){
|
||||
let list=getRandomCardsByType(cardType.SPECIAL,4)
|
||||
let list=getRandomCardsByType(cardType.SPECIAL,3)
|
||||
console.log("[CardsComp]:功能选择卡牌列表",list)
|
||||
this.card1c.func_select(list[0])
|
||||
this.card2c.func_select(list[1])
|
||||
this.card3c.func_select(list[2])
|
||||
this.card4c.func_select(list[3])
|
||||
// this.card4c.func_select(list[3])
|
||||
}
|
||||
random_select(){
|
||||
this.card1c.random_select()
|
||||
this.card2c.random_select()
|
||||
this.card3c.random_select()
|
||||
this.card4c.random_select()
|
||||
// this.card4c.random_select()
|
||||
}
|
||||
|
||||
/** 添加卡牌展示到队列 */
|
||||
|
||||
Reference in New Issue
Block a user