卡组刷新 及预置广告 抽紫装, 成功后刷紫装未做
This commit is contained in:
@@ -25,7 +25,6 @@ export class CardComp extends CCComp {
|
||||
cost_gold:number=0;
|
||||
onLoad(){
|
||||
// this.on(GameEvent.HeroSelect,this.hero_select,this)
|
||||
// this.on(GameEvent.HeroSkillSelect,this.hero_skill_select,this)
|
||||
}
|
||||
|
||||
start() {
|
||||
@@ -107,7 +106,7 @@ export class CardComp extends CCComp {
|
||||
let show=this.node.getChildByName("show")
|
||||
show.getChildByName("name").getChildByName("name").getComponent(Label).string=SkillSet[uuid].name
|
||||
this.do_card_bg_show(SkillSet[uuid].quality)
|
||||
this.node.getChildByName("Button").getChildByName("coins").active=false
|
||||
this.node.getChildByName("show").getChildByName("coins").active=false
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = show.getChildByName("mask").getChildByName("skill").getComponent(Sprite);
|
||||
@@ -120,7 +119,7 @@ export class CardComp extends CCComp {
|
||||
let show=this.node.getChildByName("show")
|
||||
show.getChildByName("name").getChildByName("name").getComponent(Label).string=HeroInfo[uuid].name
|
||||
this.do_card_bg_show(HeroInfo[uuid].quality)
|
||||
this.node.getChildByName("Button").getChildByName("coins").active=false
|
||||
this.node.getChildByName("show").getChildByName("coins").active=false
|
||||
// show.getChildByName("ap").active=true
|
||||
// show.getChildByName("hp").active=true
|
||||
// show.getChildByName("ap").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
|
||||
@@ -200,10 +199,10 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("mask").getChildByName("q3").active=q==Quality.BLUE
|
||||
show.getChildByName("mask").getChildByName("q4").active=q==Quality.PURPLE
|
||||
show.getChildByName("mask").getChildByName("q5").active=q==Quality.ORANGE
|
||||
this.node.getChildByName("Button").getChildByName("coins").active=true
|
||||
this.node.getChildByName("Button").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
|
||||
this.node.getChildByName("show").getChildByName("coins").active=true
|
||||
this.node.getChildByName("show").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
|
||||
}
|
||||
|
||||
|
||||
get_cost_gold(quality:number){
|
||||
switch(quality){
|
||||
case Quality.GREEN:
|
||||
@@ -231,7 +230,7 @@ export class CardComp extends CCComp {
|
||||
// return "替换"
|
||||
// }
|
||||
// }
|
||||
return "购买"
|
||||
return "获取"
|
||||
}
|
||||
reset_card(){
|
||||
this.cost_gold=0
|
||||
|
||||
Reference in New Issue
Block a user