Пример #1
0
    public static bool isAuthoritative(bool isLocalPlayer, RealOwner realOwner)
    {
        if (useUNet)
        {
            if (isLocalPlayer)
            {
                return(true);
            }

            return(false);
        }
        else
        {
            if (Network.peerType == NetworkPeerType.Disconnected)
            {
                return(true);
            }
            else
            if (Network.player == realOwner.owner)
            {
                return(true);
            }

            return(false);
        }
    }
Пример #2
0
 public static bool isAuthoritative(NetworkIdentity identity, RealOwner realOwner)
 {
     if (identity != null)
     {
         return(isAuthoritative(identity.isLocalPlayer, realOwner));
     }
     else
     {
         return(true);
     }
 }