伙伴复活时间减少完善

This commit is contained in:
2025-06-17 14:49:26 +08:00
parent d02482a591
commit 0a1e2b7813
6 changed files with 67 additions and 61 deletions

View File

@@ -2,6 +2,8 @@ import { _decorator, Component, Node } from 'cc';
import { oops } from 'db://oops-framework/core/Oops';
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';
const { ccclass, property } = _decorator;
@ccclass('FightConComp')
@@ -23,11 +25,26 @@ export class FightConComp extends Component {
temp_friend_debuff = this.getInitTempDebuff();
temp_enemy_debuff = this.getInitTempDebuff();
atk_type:number=0;
Friend_alive_cd:number=FightSet.FRIEND_LIVE_CD
onLoad(){
// console.log("fight con start")
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)
}
protected start(): void {
this.Friend_alive_cd=FightSet.FRIEND_LIVE_CD
}
change_equip_special_attr(e:GameEvent,data:any){
console.log("[FightConComp]:change_equip_special_attr",data)
this.up_friend_alive_cd(data.friend_live_cd_less)
}
up_friend_alive_cd(less:number){
this.Friend_alive_cd=FightSet.FRIEND_LIVE_CD-less
}
private equip_change(e:GameEvent,equip:any){