SyncForNewObserver() private method

private SyncForNewObserver ( Observer observer ) : void
observer Observer
return void
 internal void Tick()
 {
     try {
         int    id  = 0;
         object msg = null;
         while ((msg = peer_.PeekLogicMsg(out id)) != null)
         {
             //观察者只处理2个消息,进入与退出
             Msg_CR_Observer observerMsg = msg as Msg_CR_Observer;
             if (null != observerMsg)
             {
                 IsEntered = true;
                 Scene scene = OwnRoom.ActiveScene;
                 if (null != scene)
                 {
                     scene.SyncForNewObserver(this);
                 }
                 LogSys.Log(LOG_TYPE.DEBUG, "Msg_CR_Observer from observer {0}({1})", Guid, Name);
             }
             else
             {
                 Msg_CR_Quit quitMsg = msg as Msg_CR_Quit;
                 if (null != quitMsg)
                 {
                     OwnRoom.DropObserver(this);
                     LogSys.Log(LOG_TYPE.DEBUG, "Msg_CR_Quit from observer {0}({1})", Guid, Name);
                     break;
                 }
                 else
                 {
                     //LogSys.Log(LOG_TYPE.DEBUG, "msg {0} from observer {1}({2})", msg.GetType().Name, Guid, Name);
                 }
             }
         }
     } catch (Exception ex) {
         LogSys.Log(LOG_TYPE.ERROR, "Exception {0}\n{1}", ex.Message, ex.StackTrace);
     }
 }