/// <summary>
        /// 创建网络连接关闭事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的网络连接关闭事件。</returns>
        public static NetworkClosedEventArgs Create(GameFramework.Network.NetworkClosedEventArgs e)
        {
            NetworkClosedEventArgs networkClosedEventArgs = ReferencePool.Acquire <NetworkClosedEventArgs>();

            networkClosedEventArgs.NetworkChannel = e.NetworkChannel;
            return(networkClosedEventArgs);
        }
    private void OnNetworkClosed(object sender, GameFramework.Event.GameEventArgs e)
    {
        UnityGameFramework.Runtime.NetworkClosedEventArgs ne = (UnityGameFramework.Runtime.NetworkClosedEventArgs)e;
        if (ne.NetworkChannel != m_NetworkChannel)
        {
            return;
        }

        Log.Error("NetworkChannel {0} is closed.", ne.NetworkChannel.Name);
    }
        private void OnNetworkClosed(object sender, GameEventArgs e)
        {
            UnityGameFramework.Runtime.NetworkClosedEventArgs ne = (UnityGameFramework.Runtime.NetworkClosedEventArgs)e;
            if (ne.NetworkChannel != _networkChannel)
            {
                return;
            }

            Log.Info("Network channel '{0}' closed.", ne.NetworkChannel.Name);
        }
Esempio n. 4
0
 private void OnNetworkClosed(object sender, GameEventArgs e)
 {
     UnityGameFramework.Runtime.NetworkClosedEventArgs ne = (UnityGameFramework.Runtime.NetworkClosedEventArgs)e;
     if (ne.NetworkChannel != m_NetworkChannel)
     {
         return;
     }
     IsConnectedToServer = false;
     //procedureOwner.SetData<VarInt>(Constant.ProcedureData.NextSceneId, (int)SceneId.Login);
     //ChangeState<ProcedureChangeScene>(procedureOwner);
     GameFramework.Procedure.ProcedureBase currentProcedure = GameEntry.Procedure.CurrentProcedure;
 }
Esempio n. 5
0
 private void OnNetworkClosed(object sender, GameFramework.Network.NetworkClosedEventArgs e)
 {
     m_EventComponent.Fire(this, NetworkClosedEventArgs.Create(e));
 }