示例#1
0
        private void LogCollider(EventType type, Collider other)
        {
            if (netId.IsEmpty())
            {
                if (GetComponent <NetworkIdentity>() != null)
                {
                    netId = GetComponent <NetworkIdentity>().netId;
                }
                else
                {
                    throw new MissingComponentException("CollisionSynchronization cannot be used without a NetworkIdentity component!");
                }
            }

            NetworkIdentity networkIdentity = other.gameObject.GetComponent <NetworkIdentity>();

            if (networkIdentity != null)
            {
                EventSynchronizer.LogEvent(type, netId, networkIdentity.netId.Value);
            }
        }
示例#2
0
 public static void OnClick(NetworkInstanceId netId)
 {
     EventSynchronizer.LogEvent(EventType.OnClick, netId, 0);
 }