dd
This commit is contained in:
@@ -112,6 +112,7 @@ export class CardComp extends CCComp {
|
||||
const sprite = show.getChildByName("mask").getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
|
||||
});
|
||||
show.getChildByName("info").getComponent(Label).string=SkillSet[uuid].info
|
||||
}
|
||||
show_hero(uuid:number){
|
||||
let show=this.node.getChildByName("show")
|
||||
@@ -130,6 +131,8 @@ export class CardComp extends CCComp {
|
||||
const sprite = show.getChildByName("mask").getChildByName("hero").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
|
||||
});
|
||||
show.getChildByName("info").getComponent(Label).string=HeroInfo[uuid].info
|
||||
|
||||
}
|
||||
show_equip(uuid:number){
|
||||
let show=this.node.getChildByName("show")
|
||||
@@ -140,6 +143,7 @@ export class CardComp extends CCComp {
|
||||
const sprite = show.getChildByName("mask").getChildByName("equip").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(EquipInfo[uuid].uuid.toString());
|
||||
});
|
||||
show.getChildByName("info").getComponent(Label).string=EquipInfo[uuid].info
|
||||
}
|
||||
show_func(uuid:number){
|
||||
let show=this.node.getChildByName("show")
|
||||
@@ -150,7 +154,7 @@ export class CardComp extends CCComp {
|
||||
const sprite = show.getChildByName("mask").getChildByName("func").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SuperCards[uuid].path);
|
||||
});
|
||||
|
||||
show.getChildByName("info").getComponent(Label).string=SuperCards[uuid].info
|
||||
}
|
||||
do_card_bg_show(){
|
||||
this.node.getChildByName("Button").getChildByName("Label").getComponent(Label).string=this.check_heros()
|
||||
|
||||
@@ -89,7 +89,7 @@ export class CardsCompComp extends CCComp {
|
||||
|
||||
/** 添加卡牌展示到队列 */
|
||||
private addToQueue(e: GameEvent, data?: any) {
|
||||
console.log("[CardsComp]:添加卡牌到队列", e);
|
||||
console.log("[CardsComp]:添加卡牌到队列", e,data);
|
||||
this.cardQueue.push({type: e, data: data});
|
||||
this.processQueue();
|
||||
}
|
||||
@@ -119,7 +119,7 @@ export class CardsCompComp extends CCComp {
|
||||
case GameEvent.CardRefresh:
|
||||
console.log("[CardsComp]:显示随机刷新卡牌")
|
||||
this.node.getChildByName("Button").active=true
|
||||
this.random_select()
|
||||
this.func_select()
|
||||
break
|
||||
}
|
||||
this.show()
|
||||
@@ -173,7 +173,7 @@ export class CardsCompComp extends CCComp {
|
||||
.start();
|
||||
}
|
||||
clear_cards(){
|
||||
console.log("[CardsComp]:清除卡牌队列")
|
||||
// console.log("[CardsComp]:清除卡牌队列")
|
||||
this.cardQueue = [];
|
||||
this.close_cards(GameEvent.CardsClose,null)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { GameEvent } from '../common/config/GameEvent';
|
||||
import { geDebuffNum, getBuffNum, BuffAttr, DebuffAttr } from '../common/config/SkillSet';
|
||||
import { Timer } from 'db://oops-framework/core/common/timer/Timer';
|
||||
import { FightSet } from '../common/config/Mission';
|
||||
import { SuperCards, SuperCardsType } from '../common/config/CardSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('FightConComp')
|
||||
@@ -38,6 +39,7 @@ export class FightConComp extends Component {
|
||||
oops.message.on(GameEvent.EquipChange,this.equip_change,this)
|
||||
oops.message.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
oops.message.on(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_equip_special_attr,this)
|
||||
oops.message.on(GameEvent.UseSpecialCard,this.use_special_card,this)
|
||||
|
||||
}
|
||||
protected start(): void {
|
||||
@@ -111,6 +113,24 @@ export class FightConComp extends Component {
|
||||
return obj;
|
||||
}
|
||||
|
||||
private use_special_card(e:GameEvent,data:any){
|
||||
console.log("[FightConComp]:use_special_card:",SuperCards[data.uuid])
|
||||
switch(SuperCards[data.uuid].type){
|
||||
case SuperCardsType.SPECIAL:
|
||||
|
||||
break
|
||||
case SuperCardsType.AOE:
|
||||
|
||||
break
|
||||
case SuperCardsType.BUFF:
|
||||
|
||||
break
|
||||
case SuperCardsType.DEBUFF:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private clearAlls() {
|
||||
this.hero_buff=getBuffNum()
|
||||
this.friend_buff=getBuffNum()
|
||||
|
||||
Reference in New Issue
Block a user