public void Detach() { if (!isFitted) { return; } MasterAudio.PlaySound3DAtTransform("CarBuilding", partTrigger.transform, 1f, 1f, 0f, "disassemble"); gameObject.tag = "PART"; transform.parent = null; if (!destroyRigidbody) { rb.isKinematic = false; rb.useGravity = true; rb.detectCollisions = true; } attachmentTrigger.enabled = true; isFitted = false; StartCoroutine(FixParent(null)); if (disableColliders && !destroyRigidbody) { rb.detectCollisions = true; } StartCoroutine(LateDetach()); if (boltParent != null) { boltParent.SetActive(false); } OnDetach?.Invoke(); if (boltParent != null && bolts.Length != 0) { UntightenAllBolts(); } }
protected void RaiseDetachEvent(HealthHaver check) { if (check == hh && IsAbsorbed()) { OnDetach?.Invoke(); RaiseChangeEvent(); } }
/// <summary> /// 分离 左键弹开自动分离 /// </summary> public void Detach() { AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(this.host); if (adornerLayer != null) { adornerLayer.Remove(this); OnDetach?.Invoke(this, this.getEventArgs()); } }
protected void RaiseDetachEvent() { antiStackOverflow++; if (antiStackOverflow >= 500) { return; } OnDetach?.Invoke(); RaiseChangeEvent(); }
public virtual void DetachFrom(IDCLEntity entity, System.Type overridenAttachedType = null) { if (!attachedEntities.Contains(entity)) { return; } entity.OnRemoved -= OnEntityRemoved; System.Type thisType = overridenAttachedType != null ? overridenAttachedType : GetType(); entity.RemoveSharedComponent(thisType, false); attachedEntities.Remove(entity); OnDetach?.Invoke(entity); }
public void Detach() { _workerTask.ContinueWith(t => { try { DataTarget.DebuggerInterface.DetachProcesses(); } finally { try { Dispose(true); OnDetach?.Invoke(); } catch { } } }); }
public void Detach(OverlayResult overlayDataResult) { var item = _overlayReferences.Find(p => p.OverlayReferenceId == overlayDataResult.OverlayRef); if (item == null) { return; } _overlayReferences.Remove(item); if (!_overlayReferences.Any()) { _sequenceNumber = 0; } OnDetach?.Invoke(overlayDataResult); item.CloseOverlayReference(overlayDataResult); }
internal void InvokeOnDetach() => OnDetach?.Invoke(this);
protected override bool ReleaseHandle() { OnDetach?.Invoke(); return(Kernel.CloseHandle(handle)); }
protected override void Detach() { OnDetach?.Invoke(this, new EventArgs()); }
protected void RaiseOnDetach() => OnDetach?.Invoke(this);