BeardedManStudios.Network.NetworkedMonoBehavior.ProximityInCheck C# (CSharp) Метод

ProximityInCheck() публичный Метод

public ProximityInCheck ( NetworkedMonoBehavior other ) : void
other NetworkedMonoBehavior
Результат void
		public void ProximityInCheck(NetworkedMonoBehavior other)
		{
			if (!OwningNetWorker.IsServer)
				return;

			if (proximityBehaviors.Contains(other.NetworkedId))
				return;

			proximityBehaviors.Add(other.NetworkedId);
			other.proximityBehaviors.Add(this.NetworkedId);

			if (IsServerOwner)
				Unity.MainThreadManager.Run(other.EnteredProximity);
			else
				other.AuthoritativeRPC("EnteredProximity", OwningNetWorker, OwningPlayer, false);

			if (other.IsServerOwner)
				Unity.MainThreadManager.Run(EnteredProximity);
			else
				AuthoritativeRPC("EnteredProximity", OwningNetWorker, other.OwningPlayer, false);
		}