23 lines
818 B
TypeScript
23 lines
818 B
TypeScript
import { oops } from "db://oops-framework/core/Oops";
|
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
import { VM } from "../../../../extensions/oops-plugin-framework/assets/libs/model-view/ViewModel";
|
|
import { GameEvent } from "../common/config/GameEvent";
|
|
|
|
/** 数据层对象 */
|
|
@ecs.register('FriendModel')
|
|
export class FriendModelComp extends ecs.Comp {
|
|
/** 提供 MVVM 组件使用的数据 */
|
|
private vm: any = {};
|
|
onLoad(){
|
|
oops.message.on(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_equip_special_attr,this)
|
|
}
|
|
|
|
change_equip_special_attr(e:GameEvent,data:any){
|
|
console.log("[FriendModel]:change_equip_special_attr",data)
|
|
}
|
|
|
|
/** 数据层组件移除时,重置所有数据为默认值 */
|
|
reset() {
|
|
|
|
}
|
|
} |