dd
This commit is contained in:
@@ -4,6 +4,7 @@ import { GameEvent } from '../common/config/GameEvent';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { EquipInfo, EquipType, EquipAttrTarget, EquipSpecialAttr} from '../common/config/Equips';
|
||||
import { BuffAttr, DebuffAttr, geDebuffNum, getBuffNum } from '../common/config/SkillSet';
|
||||
import { FightSet } from '../common/config/Mission';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('EquipsComp')
|
||||
@@ -145,10 +146,24 @@ export class EquipsComp extends Component {
|
||||
case EquipSpecialAttr.WIND:
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK,EquipSpecialAttr.WIND)
|
||||
break
|
||||
}
|
||||
switch(armor_special_attr){
|
||||
case EquipSpecialAttr.FRIEND_LIVE_CD:
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK_FRIEND_LIVE_CD,FightSet.FRIEND_LIVE_CD_LESS)
|
||||
break
|
||||
default:
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK,0)
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK_FRIEND_LIVE_CD,0)
|
||||
break
|
||||
}
|
||||
switch(accessory_special_attr){
|
||||
case EquipSpecialAttr.FRIEND_LIVE_CD:
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK_FRIEND_LIVE_CD,FightSet.FRIEND_LIVE_CD_LESS)
|
||||
break
|
||||
default:
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK_FRIEND_LIVE_CD,0)
|
||||
break
|
||||
}
|
||||
|
||||
// 合并所有装备属性
|
||||
const allBuff = [...weapon_buffs, ...armor_buffs, ...accessory_buffs];
|
||||
const allDebuff = [...weapon_debuffs, ...armor_debuffs, ...accessory_debuffs];
|
||||
|
||||
@@ -9,6 +9,7 @@ import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { HeroPos } from "../common/config/heroSet";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -16,9 +17,13 @@ const { ccclass, property } = _decorator;
|
||||
@ecs.register('MissionHeroComp', false)
|
||||
export class MissionHeroCompComp extends CCComp {
|
||||
timer:Timer=new Timer(2)
|
||||
Friend_alive_cd:Timer=new Timer(10)
|
||||
Friend_is_dead:boolean=false
|
||||
current_hero_uuid:number=0
|
||||
onLoad(){
|
||||
this.on(GameEvent.UseHeroCard,this.call_hero,this)
|
||||
this.on(GameEvent.ChangeATK_FRIEND_LIVE_CD,this.change_friend_alive_cd,this)
|
||||
|
||||
}
|
||||
start() {
|
||||
// this.test_call()
|
||||
@@ -26,8 +31,18 @@ export class MissionHeroCompComp extends CCComp {
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if(smc.mission.status != 1) return
|
||||
if(this.Friend_is_dead){
|
||||
if(this.Friend_alive_cd.update(dt)){
|
||||
console.log("alive friend")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
change_friend_alive_cd(e:GameEvent,data:any){
|
||||
console.log("change_friend_alive_cd",data)
|
||||
this.Friend_alive_cd=new Timer(FightSet.FRIEND_LIVE_CD-data)
|
||||
}
|
||||
|
||||
init(){
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user