装备添加

This commit is contained in:
2025-06-08 23:16:40 +08:00
parent 63f4d1067e
commit 094b55f349
50 changed files with 20810 additions and 62152 deletions

View File

@@ -0,0 +1,70 @@
import { _decorator, Component, Node } from 'cc';
import { oops } from 'db://oops-framework/core/Oops';
import { GameEvent } from '../common/config/GameEvent';
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,
}
}
onLoad(){
// console.log("fight con start")
oops.message.on(GameEvent.EquipChange,this.equip_change,this)
oops.message.on(GameEvent.FightReady,this.fight_ready,this)
}
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
}
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,
}
}
update(deltaTime: number) {
}
}