功能性卡牌功能继续
This commit is contained in:
@@ -49,7 +49,7 @@ export class CardsCompComp extends CCComp {
|
||||
}
|
||||
hero_select(){
|
||||
let list=getRandomCardsByType(cardType.HERO,4)
|
||||
console.log("英雄选择卡牌列表",list)
|
||||
console.log("[CardsComp]:英雄选择卡牌列表",list)
|
||||
this.card1c.hero_select(list[0])
|
||||
this.card2c.hero_select(list[1])
|
||||
this.card3c.hero_select(list[2])
|
||||
@@ -57,9 +57,8 @@ export class CardsCompComp extends CCComp {
|
||||
}
|
||||
|
||||
hero_skill_select(){
|
||||
|
||||
let list=getRandomCardsByType(cardType.SKILL,4)
|
||||
console.log("技能选择卡牌列表",list)
|
||||
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])
|
||||
@@ -67,14 +66,19 @@ export class CardsCompComp extends CCComp {
|
||||
}
|
||||
equip_select(){
|
||||
let list=getRandomCardsByType(cardType.EQUIP,4)
|
||||
console.log("装备选择卡牌列表",list)
|
||||
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])
|
||||
}
|
||||
func_select(){
|
||||
console.log("功能选择卡牌")
|
||||
let list=getRandomCardsByType(cardType.SPECIAL,4)
|
||||
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])
|
||||
}
|
||||
random_select(){
|
||||
this.card1c.random_select()
|
||||
@@ -85,7 +89,7 @@ export class CardsCompComp extends CCComp {
|
||||
|
||||
/** 添加卡牌展示到队列 */
|
||||
private addToQueue(e: GameEvent, data?: any) {
|
||||
console.log("添加卡牌到队列", e);
|
||||
console.log("[CardsComp]:添加卡牌到队列", e);
|
||||
this.cardQueue.push({type: e, data: data});
|
||||
this.processQueue();
|
||||
}
|
||||
@@ -105,15 +109,15 @@ export class CardsCompComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=false
|
||||
switch(e){
|
||||
case GameEvent.HeroSelect:
|
||||
console.log("显示英雄选择卡牌")
|
||||
console.log("[CardsComp]:显示英雄选择卡牌")
|
||||
this.hero_select()
|
||||
break
|
||||
case GameEvent.HeroSkillSelect:
|
||||
console.log("显示技能选择卡牌")
|
||||
console.log("[CardsComp]:显示技能选择卡牌")
|
||||
this.hero_skill_select()
|
||||
break
|
||||
case GameEvent.CardRefresh:
|
||||
console.log("显示随机刷新卡牌")
|
||||
console.log("[CardsComp]:显示随机刷新卡牌")
|
||||
this.node.getChildByName("Button").active=true
|
||||
this.random_select()
|
||||
break
|
||||
@@ -123,16 +127,16 @@ export class CardsCompComp extends CCComp {
|
||||
close_cards(e:GameEvent,data:any){
|
||||
switch(e){
|
||||
case GameEvent.HeroSelect:
|
||||
console.log("关闭英雄选择卡牌")
|
||||
console.log("[CardsComp]:关闭英雄选择卡牌")
|
||||
break
|
||||
case GameEvent.HeroSkillSelect:
|
||||
console.log("关闭技能选择卡牌")
|
||||
console.log("[CardsComp]:关闭技能选择卡牌")
|
||||
break
|
||||
case GameEvent.CardRefresh:
|
||||
console.log("关闭随机刷新卡牌")
|
||||
console.log("[CardsComp]:关闭随机刷新卡牌")
|
||||
break
|
||||
case GameEvent.CardsClose:
|
||||
console.log("关闭所有卡牌")
|
||||
console.log("[CardsComp]:关闭所有卡牌")
|
||||
break
|
||||
}
|
||||
this.hide()
|
||||
|
||||
Reference in New Issue
Block a user