Пример #1
0
        //-------------------------------------------------------------------------
        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);
                //}
            }
        }
Пример #2
0
 //-------------------------------------------------------------------------
 void _onPropIcoChanged(IProp prop, object param)
 {
     CoActorMirror.updateMirrorActorInfo(Def.mPropNickName.get(), Def.mPropIcon.get());
 }