本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}