天赋替换完成
This commit is contained in:
@@ -25,6 +25,7 @@ export class HeroConComp extends CCComp {
|
||||
this.on(GameEvent.UseSpecialCard,this.use_special_card,this)
|
||||
this.on(GameEvent.UseEnhancement,this.use_enhancement,this)
|
||||
this.on(GameEvent.UseTalentCard,this.use_talent_card,this)
|
||||
this.on(GameEvent.RemoveTalent,this.remove_talent_card,this)
|
||||
|
||||
this.heroView=this.node.getComponent(HeroViewComp)
|
||||
console.log("[HeroConCompComp]:onLoad",this.heroView)
|
||||
@@ -155,12 +156,15 @@ export class HeroConComp extends CCComp {
|
||||
}
|
||||
}
|
||||
remove_talent_card(e:GameEvent,data:any){
|
||||
console.log("[HeroConCompComp]:remove_talent_card",data)
|
||||
|
||||
let tal=TalentList[data.uuid]
|
||||
console.log("[HeroConCompComp]:remove_talent_card",data,tal)
|
||||
switch(tal.buffType){
|
||||
case BuffAttr.ATK:
|
||||
console.log("[HeroConCompComp]:atk",this.heroView.TALENT[BuffAttr.ATK],tal.value)
|
||||
this.heroView.TALENT[BuffAttr.ATK]-=tal.value
|
||||
this.heroView.count_atrr(BuffAttr.ATK)
|
||||
console.log("[HeroConCompComp]ed:atk",this.heroView.TALENT[BuffAttr.ATK],tal.value)
|
||||
break
|
||||
case BuffAttr.ATK_CD:
|
||||
this.heroView.TALENT[BuffAttr.ATK_CD]-=tal.value
|
||||
|
||||
Reference in New Issue
Block a user