UpdateClientServer() 개인적인 메소드

private UpdateClientServer ( bool isClientFlag, bool isServerFlag ) : void
isClientFlag bool
isServerFlag bool
리턴 void
예제 #1
0
 internal void SetLocalObject(NetworkInstanceId netId, GameObject obj, bool isClient, bool isServer)
 {
     if (LogFilter.logDev)
     {
         Debug.Log(string.Concat(new object[]
         {
             "SetLocalObject ",
             netId,
             " ",
             obj
         }));
     }
     if (obj == null)
     {
         this.m_LocalObjects[netId] = null;
     }
     else
     {
         NetworkIdentity networkIdentity = null;
         if (this.m_LocalObjects.ContainsKey(netId))
         {
             networkIdentity = this.m_LocalObjects[netId];
         }
         if (networkIdentity == null)
         {
             networkIdentity            = obj.GetComponent <NetworkIdentity>();
             this.m_LocalObjects[netId] = networkIdentity;
         }
         networkIdentity.UpdateClientServer(isClient, isServer);
     }
 }
        internal void SetLocalObject(NetworkInstanceId netId, GameObject obj, bool isClient, bool isServer)
        {
            if (LogFilter.logDev)
            {
                Debug.Log("SetLocalObject " + netId + " " + obj);
            }

            if (obj == null)
            {
                m_LocalObjects[netId] = null;
                return;
            }

            NetworkIdentity foundNetworkIdentity = null;

            if (m_LocalObjects.ContainsKey(netId))
            {
                foundNetworkIdentity = m_LocalObjects[netId];
            }

            if (foundNetworkIdentity == null)
            {
                foundNetworkIdentity  = obj.GetComponent <NetworkIdentity>();
                m_LocalObjects[netId] = foundNetworkIdentity;
            }

            foundNetworkIdentity.UpdateClientServer(isClient, isServer);
        }
예제 #3
0
 internal void SetLocalObject(NetworkInstanceId netId, GameObject obj, bool isClient, bool isServer)
 {
     if (LogFilter.logDev)
     {
         Debug.Log((object)("SetLocalObject " + (object)netId + " " + (object)obj));
     }
     if ((Object)obj == (Object)null)
     {
         this.m_LocalObjects[netId] = (NetworkIdentity)null;
     }
     else
     {
         NetworkIdentity networkIdentity = (NetworkIdentity)null;
         if (this.m_LocalObjects.ContainsKey(netId))
         {
             networkIdentity = this.m_LocalObjects[netId];
         }
         if ((Object)networkIdentity == (Object)null)
         {
             networkIdentity            = obj.GetComponent <NetworkIdentity>();
             this.m_LocalObjects[netId] = networkIdentity;
         }
         networkIdentity.UpdateClientServer(isClient, isServer);
     }
 }