当前位置: 首页>>代码示例>>C#>>正文


C# NetworkConnection.AddToVisList方法代码示例

本文整理汇总了C#中UnityEngine.Networking.NetworkConnection.AddToVisList方法的典型用法代码示例。如果您正苦于以下问题:C# NetworkConnection.AddToVisList方法的具体用法?C# NetworkConnection.AddToVisList怎么用?C# NetworkConnection.AddToVisList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.Networking.NetworkConnection的用法示例。


在下文中一共展示了NetworkConnection.AddToVisList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddObserver

 internal void AddObserver(NetworkConnection conn)
 {
     if (this.m_Observers == null)
     {
         if (LogFilter.logError)
         {
             Debug.LogError("AddObserver for " + base.gameObject + " observer list is null");
         }
     }
     else if (this.m_ObserverConnections.Contains(conn.connectionId))
     {
         if (LogFilter.logDebug)
         {
             Debug.Log(string.Concat(new object[] { "Duplicate observer ", conn.address, " added for ", base.gameObject }));
         }
     }
     else
     {
         if (LogFilter.logDev)
         {
             Debug.Log(string.Concat(new object[] { "Added observer ", conn.address, " added for ", base.gameObject }));
         }
         this.m_Observers.Add(conn);
         this.m_ObserverConnections.Add(conn.connectionId);
         conn.AddToVisList(this);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:27,代码来源:NetworkIdentity.cs

示例2: AddObserver

 internal void AddObserver(NetworkConnection conn)
 {
     if (this.m_Observers == null)
     return;
       if (this.m_Observers.Contains(conn))
       {
     if (!LogFilter.logWarn)
       return;
     object[] objArray = new object[4];
     int index1 = 0;
     string str1 = "Duplicate observer ";
     objArray[index1] = (object) str1;
     int index2 = 1;
     string str2 = conn.address;
     objArray[index2] = (object) str2;
     int index3 = 2;
     string str3 = " added for ";
     objArray[index3] = (object) str3;
     int index4 = 3;
     GameObject gameObject = this.gameObject;
     objArray[index4] = (object) gameObject;
     Debug.LogWarning((object) string.Concat(objArray));
       }
       else
       {
     if (LogFilter.logDev)
     {
       object[] objArray = new object[4];
       int index1 = 0;
       string str1 = "Added observer ";
       objArray[index1] = (object) str1;
       int index2 = 1;
       string str2 = conn.address;
       objArray[index2] = (object) str2;
       int index3 = 2;
       string str3 = " added for ";
       objArray[index3] = (object) str3;
       int index4 = 3;
       GameObject gameObject = this.gameObject;
       objArray[index4] = (object) gameObject;
       Debug.Log((object) string.Concat(objArray));
     }
     this.m_Observers.Add(conn);
     conn.AddToVisList(this);
       }
 }
开发者ID:Kitabalef,项目名称:Unet-Decompiles,代码行数:46,代码来源:NetworkIdentity.cs

示例3: AddObserver

 internal void AddObserver(NetworkConnection conn)
 {
   if (this.m_Observers == null)
   {
     if (!LogFilter.logError)
       return;
     Debug.LogError((object) ("AddObserver for " + (object) this.gameObject + " observer list is null"));
   }
   else if (this.m_ObserverConnections.Contains(conn.connectionId))
   {
     if (!LogFilter.logDebug)
       return;
     Debug.Log((object) ("Duplicate observer " + conn.address + " added for " + (object) this.gameObject));
   }
   else
   {
     if (LogFilter.logDev)
       Debug.Log((object) ("Added observer " + conn.address + " added for " + (object) this.gameObject));
     this.m_Observers.Add(conn);
     this.m_ObserverConnections.Add(conn.connectionId);
     conn.AddToVisList(this);
   }
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:23,代码来源:NetworkIdentity.cs


注:本文中的UnityEngine.Networking.NetworkConnection.AddToVisList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。