基础主将添加+ 修复第一次伤害计算为穿刺伤害bug
This commit is contained in:
@@ -25,6 +25,7 @@ export class CardComp extends CCComp {
|
||||
cost_gold:number=0;
|
||||
skill_slot:string="skill1"
|
||||
equip_slot:string="weapon"
|
||||
is_master:boolean=false;
|
||||
onLoad(){
|
||||
// this.on(GameEvent.HeroSelect,this.hero_select,this)
|
||||
}
|
||||
@@ -37,11 +38,13 @@ export class CardComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=false
|
||||
this.node.getChildByName("show").active=false
|
||||
}
|
||||
hero_select(args: any){
|
||||
hero_select(args: any,is_master:boolean=false){
|
||||
console.log("[cardcomp]:card hero_select",args,is_master)
|
||||
this.c_type=cardType.HERO
|
||||
this.c_uuid=args.uuid
|
||||
console.log("[cardcomp]:card hero_select c_uuid:"+this.c_uuid)
|
||||
this.show_hero(this.c_uuid)
|
||||
this.is_master=is_master
|
||||
this.show_hero(this.c_uuid,is_master)
|
||||
this.node.getChildByName("show").active=false
|
||||
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
|
||||
this.scheduleOnce(() => {
|
||||
@@ -113,7 +116,7 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("info").getComponent(Label).string=SkillSet[uuid].info
|
||||
}
|
||||
|
||||
show_hero(uuid:number){
|
||||
show_hero(uuid:number,is_master:boolean=false){
|
||||
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)
|
||||
@@ -274,7 +277,7 @@ export class CardComp extends CCComp {
|
||||
use_card(){
|
||||
switch(this.c_type){
|
||||
case cardType.HERO:
|
||||
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid})
|
||||
oops.message.dispatchEvent(GameEvent.UseHeroCard,{uuid:this.c_uuid,is_master:this.is_master})
|
||||
oops.message.dispatchEvent(GameEvent.CardsClose)
|
||||
break
|
||||
case cardType.SKILL:
|
||||
|
||||
Reference in New Issue
Block a user