Beispiel #1
0
 private void OnDestroy()
 {
     if (OnDestroyEvent != null)
     {
         OnDestroyEvent.Invoke(this);
     }
 }
 /// <summary>
 /// Cleans up any resources the object has open.
 /// </summary>
 protected override void OnDestroy()
 {
     if (this.endOfFrameCoroutine != null)
     {
         this.StopCoroutine(this.endOfFrameCoroutine);
     }
     OnDestroyEvent?.Invoke();
 }
 private void OnDestroy()
 {
     OnDestroyEvent();
     foreach (var d in OnDestroyEvent.GetInvocationList())
     {
         OnDestroyEvent -= (Action)d;
     }
 }
 public CoreBehavior()
 {
     BehaviorManager.Get.AddBehavior(this);
     Start();
     onUpdateEvent     = Update;
     onLateUpdateEvent = LateUpdate;
     onDestroyEvent    = OnDestroy;
 }
Beispiel #5
0
 public virtual void Deactivate()
 {
     _active = false;
     _animator.SetTrigger("Deactivate");
     GameManager.Instance.OnGameOver -= OnGameOver;
     GameManager.Instance.OnPause    -= ToggleActive;
     OnDestroyEvent?.Invoke(this);
 }
        private void OnDestroy()
        {
            OnDestroyEvent.Invoke();

            OnStartEvent      = null;
            OnUpdateEvent     = null;
            OnDestroyEvent    = null;
            onLateUpdateEvent = null;
        }
Beispiel #7
0
 public void Destroy()
 {
     if (!IsDestroyed)
     {
         IsDestroyed = true;
         OnDestroyEvent?.Invoke(this);
         NetworkBehavior.IdentityDestroy(this);
     }
 }
Beispiel #8
0
 public virtual void OnSetDestroy()
 {
     EngManager.controls.hitboxesMouseOver.Remove(this);
     EngManager.controls.FindTopHitbox();
     OnDestroyEvent?.Invoke(this, null);
 }
 private void OnDestroy()
 {
     OnDestroyEvent?.Invoke();
     OnDestroyAction?.Invoke();
 }
 void OnDestroy()
 {
     OnDestroyEvent?.Invoke(this);
 }
Beispiel #11
0
 public void DestroyWidget()
 {
     OnDestroyEvent?.Invoke(this);
 }
Beispiel #12
0
 void OnDestroy()
 {
     OnDestroyEvent?.Invoke();
 }
Beispiel #13
0
 public Task Destroy(ModalRef modalRef)
 {
     return(OnDestroyEvent?.Invoke(modalRef));
 }
 protected virtual void OnDisable()
 {
     OnDestroyEvent?.Invoke();
 }
Beispiel #15
0
 public void OnDestroy()
 {
     onDestroyUnityEvent?.Invoke();
     OnDestroyEvent?.Invoke();
 }
 public Task Destroy(ConfirmRef confirmRef)
 {
     return(OnDestroyEvent?.Invoke(confirmRef));
 }