//------------------------------------------------------------------------- public override void release() { if (Bt != null) { Bt.close(); Bt = null; } }
//------------------------------------------------------------------------- void _onPropBtNameChanged(IProp prop, object param) { string bt_name = Def.mPropBtName.get(); if (!string.IsNullOrEmpty(bt_name)) { Bt = CellApp.Instance.createBt(bt_name, Entity); } }
//------------------------------------------------------------------------- public override void release() { if (Bt != null) { Bt.close(); Bt = null; } CoActorMirror = null; ActorAiConfig = null; }
//------------------------------------------------------------------------- public override void init() { TbDataPlayer = EbDataMgr.Instance.getData <TbDataPlayer>(Def.mPropPlayerTableId.get()); Def.mPropLevel.OnChanged = _onPropLevelChanged; Def.mPropNickName.OnChanged = _onPropNickNameChanged; Def.mPropIcon.OnChanged = _onPropIcoChanged; CoActorMirror = Entity.getComponent <ClientActorMirror <DefActorMirror> >(); CoActorMirror.initActor(Def.mPropPlayerTableId.get(), () => { //CoActorMirror.SceneActorObj.setIcon(Def.mPropIcon.get()); //CoActorMirror.SceneActorObj.setNickName(Def.mPropNickName.get(), Color.green); }); CoActorMirror.updateMirrorActorInfo(Def.mPropNickName.get(), Def.mPropIcon.get()); if (CoActorMirror.IsMe) { Entity et_app = EntityMgr.findFirstEntityByType <EtApp>(); var co_app = et_app.getComponent <ClientApp <DefApp> >(); Bt = co_app.createBt("BtPlayerMirror", Entity); //writeBlackboardPlayerOperateType(PlayerOperateType.None); writeBlackboardPosMoveTo(-10000, -10000); writeBlackboardLastPosMoveTo(-10000, 10000); writeBlackboardSelectEntity(null); writeBlackboardSkillItemId(0); writeBlackboardTaskId(0); writeBlackboardTaskAutoInfo(null); // 恢复任务自动执行 //if (CoActorMirror.CoScene.TaskAutoInfo != null) //{ // writeBlackboardPlayerOperateType(PlayerOperateType.DoTask); // writeBlackboardTaskAutoInfo(CoActorMirror.CoScene.TaskAutoInfo); //} } }