This commit is contained in:
2025-06-11 16:54:50 +08:00
parent 4096922e61
commit d06d8fe910
10 changed files with 295 additions and 141 deletions

View File

@@ -5,40 +5,51 @@ const { ccclass, property } = _decorator;
@ccclass('FightConComp')
export class FightConComp extends Component {
attrs:any={
hero:{
ap:0,
hp:0,
atk_count:0,
atk_speed:0,
skill_dmg:0,
skill_cd:0,
},
ally:{
ap:0,
hp:0,
atk_count:0,
atk_speed:0,
skill_dmg:0,
skill_cd:0,
},
enemy:{
ap:0,
hp:0,
atk_count:0,
atk_speed:0,
skill_dmg:0,
skill_cd:0,
},
friend:{
ap:0,
hp:0,
atk_count:0,
atk_speed:0,
skill_dmg:0,
skill_cd:0,
}
hero:{
ATK:0, // 攻击力
ATK_COUNT:0, // 攻击个数
ATK_CD:0, // 攻击速度
HP:0, // 生命值
DEF:0, // 免伤
SKILL_DMG:0, // 技能效果
SKILL_CD:0, // 技能冷却缩减
CARD_EFFECT:0, // 卡牌效果
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
}
ally:{
ATK:0, // 攻击力
ATK_COUNT:0, // 攻击个数
ATK_CD:0, // 攻击速度
HP:0, // 生命值
DEF:0, // 免伤
SKILL_DMG:0, // 技能效果
SKILL_CD:0, // 技能冷却缩减
CARD_EFFECT:0, // 卡牌效果
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
}
enemy:{
ATK:0, // 攻击力
ATK_COUNT:0, // 攻击个数
ATK_CD:0, // 攻击速度
HP:0, // 生命值
DEF:0, // 免伤
SKILL_DMG:0, // 技能效果
SKILL_CD:0, // 技能冷却缩减
CARD_EFFECT:0, // 卡牌效果
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
}
friend:{
ATK:0, // 攻击力
ATK_COUNT:0, // 攻击个数
ATK_CD:0, // 攻击速度
HP:0, // 生命值
DEF:0, // 免伤
SKILL_DMG:0, // 技能效果
SKILL_CD:0, // 技能冷却缩减
CARD_EFFECT:0, // 卡牌效果
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
}
onLoad(){
// console.log("fight con start")
oops.message.on(GameEvent.EquipChange,this.equip_change,this)
@@ -46,19 +57,22 @@ export class FightConComp extends Component {
}
equip_change(e:GameEvent,equip:any){
this.attrs.hero=equip.hero
this.attrs.ally=equip.ally
this.attrs.enemy=equip.enemy
this.attrs.friend=equip.friend
this.hero=equip.hero
this.ally=equip.ally
this.enemy=equip.enemy
this.friend=equip.friend
}
fight_ready(e:GameEvent){
this.attrs.hero=this.attrs.ally=this.attrs.enemy=this.attrs.friend={
ap:0,
hp:0,
atk_count:0,
atk_speed:0,
skill_dmg:0,
skill_cd:0,
this.hero=this.ally=this.enemy=this.friend={
ATK:0, // 攻击力
ATK_COUNT:0, // 攻击个数
ATK_CD:0, // 攻击速度
HP:0, // 生命值
DEF:0, // 免伤
SKILL_DMG:0, // 技能效果
SKILL_CD:0, // 技能冷却缩减
CARD_EFFECT:0, // 卡牌效果
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
}
}