卡牌调整为3张
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -12954,7 +12954,7 @@
|
|||||||
"propertyPath": [
|
"propertyPath": [
|
||||||
"_active"
|
"_active"
|
||||||
],
|
],
|
||||||
"value": true
|
"value": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
@@ -13563,7 +13563,7 @@
|
|||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -259.593,
|
"y": -225,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"_lrot": {
|
"_lrot": {
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ export class CardsCompComp extends CCComp {
|
|||||||
card1:any=null
|
card1:any=null
|
||||||
card2:any=null
|
card2:any=null
|
||||||
card3:any=null
|
card3:any=null
|
||||||
card4:any=null
|
// card4:any=null
|
||||||
card1c:CardComp=null
|
card1c:CardComp=null
|
||||||
card2c:CardComp=null
|
card2c:CardComp=null
|
||||||
card3c:CardComp=null
|
card3c:CardComp=null
|
||||||
card4c:CardComp=null
|
// card4c:CardComp=null
|
||||||
|
|
||||||
/** 卡牌展示队列 */
|
/** 卡牌展示队列 */
|
||||||
private cardQueue: Array<{type: GameEvent, data?: any}> = [];
|
private cardQueue: Array<{type: GameEvent, data?: any}> = [];
|
||||||
@@ -39,52 +39,52 @@ export class CardsCompComp extends CCComp {
|
|||||||
this.card1=this.node.getChildByName("card1")
|
this.card1=this.node.getChildByName("card1")
|
||||||
this.card2=this.node.getChildByName("card2")
|
this.card2=this.node.getChildByName("card2")
|
||||||
this.card3=this.node.getChildByName("card3")
|
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.card1c=this.card1.getComponent(CardComp)
|
||||||
this.card2c=this.card2.getComponent(CardComp)
|
this.card2c=this.card2.getComponent(CardComp)
|
||||||
this.card3c=this.card3.getComponent(CardComp)
|
this.card3c=this.card3.getComponent(CardComp)
|
||||||
this.card4c=this.card4.getComponent(CardComp)
|
// this.card4c=this.card4.getComponent(CardComp)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
hero_select(){
|
hero_select(){
|
||||||
let list=getRandomCardsByType(cardType.HERO,4)
|
let list=getRandomCardsByType(cardType.HERO,3)
|
||||||
console.log("[CardsComp]:英雄选择卡牌列表",list)
|
console.log("[CardsComp]:英雄选择卡牌列表",list)
|
||||||
this.card1c.hero_select(list[0])
|
this.card1c.hero_select(list[0])
|
||||||
this.card2c.hero_select(list[1])
|
this.card2c.hero_select(list[1])
|
||||||
this.card3c.hero_select(list[2])
|
this.card3c.hero_select(list[2])
|
||||||
this.card4c.hero_select(list[3])
|
// this.card4c.hero_select(list[3])
|
||||||
}
|
}
|
||||||
|
|
||||||
hero_skill_select(){
|
hero_skill_select(){
|
||||||
let list=getRandomCardsByType(cardType.SKILL,4)
|
let list=getRandomCardsByType(cardType.SKILL,3)
|
||||||
console.log("[CardsComp]:技能选择卡牌列表",list)
|
console.log("[CardsComp]:技能选择卡牌列表",list)
|
||||||
this.card1c.hero_skill_select(list[0])
|
this.card1c.hero_skill_select(list[0])
|
||||||
this.card2c.hero_skill_select(list[1])
|
this.card2c.hero_skill_select(list[1])
|
||||||
this.card3c.hero_skill_select(list[2])
|
this.card3c.hero_skill_select(list[2])
|
||||||
this.card4c.hero_skill_select(list[3])
|
// this.card4c.hero_skill_select(list[3])
|
||||||
}
|
}
|
||||||
equip_select(){
|
equip_select(){
|
||||||
let list=getRandomCardsByType(cardType.EQUIP,4)
|
let list=getRandomCardsByType(cardType.EQUIP,3)
|
||||||
console.log("[CardsComp]:装备选择卡牌列表",list)
|
console.log("[CardsComp]:装备选择卡牌列表",list)
|
||||||
this.card1c.equip_select(list[0])
|
this.card1c.equip_select(list[0])
|
||||||
this.card2c.equip_select(list[1])
|
this.card2c.equip_select(list[1])
|
||||||
this.card3c.equip_select(list[2])
|
this.card3c.equip_select(list[2])
|
||||||
this.card4c.equip_select(list[3])
|
// this.card4c.equip_select(list[3])
|
||||||
}
|
}
|
||||||
func_select(){
|
func_select(){
|
||||||
let list=getRandomCardsByType(cardType.SPECIAL,4)
|
let list=getRandomCardsByType(cardType.SPECIAL,3)
|
||||||
console.log("[CardsComp]:功能选择卡牌列表",list)
|
console.log("[CardsComp]:功能选择卡牌列表",list)
|
||||||
this.card1c.func_select(list[0])
|
this.card1c.func_select(list[0])
|
||||||
this.card2c.func_select(list[1])
|
this.card2c.func_select(list[1])
|
||||||
this.card3c.func_select(list[2])
|
this.card3c.func_select(list[2])
|
||||||
this.card4c.func_select(list[3])
|
// this.card4c.func_select(list[3])
|
||||||
}
|
}
|
||||||
random_select(){
|
random_select(){
|
||||||
this.card1c.random_select()
|
this.card1c.random_select()
|
||||||
this.card2c.random_select()
|
this.card2c.random_select()
|
||||||
this.card3c.random_select()
|
this.card3c.random_select()
|
||||||
this.card4c.random_select()
|
// this.card4c.random_select()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 添加卡牌展示到队列 */
|
/** 添加卡牌展示到队列 */
|
||||||
|
|||||||
Reference in New Issue
Block a user