コード例 #1
0
 public void Handle(INetworkChannel networkChannel, int messageType, object messageBody)
 {
     _logger.InfoFormat("Handle:{0}", messageBody);
     switch (messageType)
     {
     case (int)EServer2ClientMessage.SceneInfo:
         LoginSuccMessage msg = (LoginSuccMessage)messageBody;
         _contexts.session.clientSessionObjects.GameRule = msg.GameRule;
         _contexts.session.commonSession.RoomInfo.FromLoginSuccMsg(msg);
         _contexts.session.commonSession.SessionMode = ModeUtil.CreateClientMode(_contexts, _contexts.session.commonSession.RoomInfo.ModeId);
         _sessionState.FullfillExitCondition(typeof(RequestSceneInfoSystem));
         break;
     }
 }
コード例 #2
0
        public void Initialize()
        {
            if (SharedConfig.IsOffline)
            {
                ArtModule.ArtModule.Initialize(SingletonManager.Get <ClientFileSystemConfigManager>().BootConfig);

                _contexts.session.clientSessionObjects.GameRule = GameRules.Offline;

                _contexts.session.commonSession.RoomInfo.MapId = SingletonManager.Get <ClientFileSystemConfigManager>().BootConfig.MapId;

                _contexts.session.commonSession.SessionMode = ModeUtil.CreateClientMode(_contexts, SharedConfig.ModeId);

                _sessionState.FullfillExitCondition(typeof(RequestSceneInfoSystem));
            }
        }
コード例 #3
0
        public void Handle(INetworkChannel networkChannel, int messageType, object messageBody)
        {
            if (messageType == (int)EServer2ClientMessage.LoginSucc)
            {
                LoginSuccMessage msg = (LoginSuccMessage)messageBody;

                _contexts.session.clientSessionObjects.GameRule = msg.GameRule;
                _contexts.session.commonSession.RoomInfo.FromLoginSuccMsg(msg);
                _contexts.session.commonSession.SessionMode = ModeUtil.CreateClientMode(_contexts, _contexts.session.commonSession.RoomInfo.ModeId);
                //_contexts.session.commonSession.WeaponModeLogic =  ClientGameModeLogicFactoryManager.GetModeLogicFactory(_contexts, _contexts.session.commonSession.RoomInfo.ModeId).CreateWeaponModeLogic();

                _loginSuccReceived = true;
            }
            if (_loginSuccReceived)
            {
                _sessionState.FullfillExitCondition(typeof(RequestRoomInfoSystem));
            }
        }