コード例 #1
0
 private void OnNetworkCustomError(object sender, GameEventArgs e)
 {
     UnityGameFramework.Runtime.NetworkCustomErrorEventArgs ne = (UnityGameFramework.Runtime.NetworkCustomErrorEventArgs)e;
     if (ne.NetworkChannel != m_NetworkChannel)
     {
         return;
     }
 }
コード例 #2
0
        /// <summary>
        /// 创建用户自定义网络错误事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的用户自定义网络错误事件。</returns>
        public static NetworkCustomErrorEventArgs Create(GameFramework.Network.NetworkCustomErrorEventArgs e)
        {
            NetworkCustomErrorEventArgs networkCustomErrorEventArgs = ReferencePool.Acquire <NetworkCustomErrorEventArgs>();

            networkCustomErrorEventArgs.NetworkChannel  = e.NetworkChannel;
            networkCustomErrorEventArgs.CustomErrorData = e.CustomErrorData;
            return(networkCustomErrorEventArgs);
        }
コード例 #3
0
    private void OnNetworkCustomError(object sender, GameFramework.Event.GameEventArgs e)
    {
        UnityGameFramework.Runtime.NetworkCustomErrorEventArgs ne = (UnityGameFramework.Runtime.NetworkCustomErrorEventArgs)e;
        if (ne.NetworkChannel != m_NetworkChannel)
        {
            return;
        }

        if (ne.CustomErrorData != null)
        {
            Log.Error("Network Packet {0} CustomError : {1}.", ne.Id, ne.CustomErrorData);
        }
    }
コード例 #4
0
 private void OnNetworkCustomError(object sender, GameFramework.Network.NetworkCustomErrorEventArgs e)
 {
     m_EventComponent.Fire(this, NetworkCustomErrorEventArgs.Create(e));
 }