// Trigger deactivation events public void TriggerDeactivated() { OnDeactivated?.Invoke(this, EventArgs.Empty); if (IsActive) { IsActive = false; OnChangedDeactivation?.Invoke(this, EventArgs.Empty); } }
private void OnMouseUp(MouseUpEvent evt) { if (!_active || !target.HasMouseCapture() || !CanStopManipulation(evt)) { return; } _active = false; target.ReleaseMouse(); OnDeactivated?.Invoke(evt); evt.StopPropagation(); }
public void ResetSound() { _audioSource.volume = 0f; _audioSource.clip = null; _onStopCallback = null; _loopCount = 0; _delayTimer = null; gameObject.SetActive(false); OnDeactivated?.Invoke(); }
private void Start() { if (blurTrigger == null || blurMaskObject == null) { return; } blurTrigger.OnPointerEnterEvent += () => { blurMaskObject.SetActive(true); OnActivated?.Invoke(); }; blurTrigger.OnPointerExitEvent += () => { blurMaskObject.SetActive(false); OnDeactivated?.Invoke(); }; }
private IEnumerator MoveToWorldY(float targetYPos, float duration) { timeExpired = 0; float startYPos = transform.position.y; Vector3 newPos = transform.position; yield return(null); while (timeExpired < duration) { timeExpired += Time.deltaTime; newPos.y = Mathf.Lerp(startYPos, targetYPos, timeExpired / duration); transform.position = newPos; yield return(null); } OnDeactivated?.Invoke(); }
public void Update() { entityCache.GetAwaitingActivation().ForEach(entity => { var attrs = entityAttributes[entity.Id.Index]; attrs.Activated = true; OnActivated?.Invoke(this, new EntityEventArgs() { Entity = entity }); }); entityCache.GetAwaitingDeactivation().ForEach(entity => { var attrs = entityAttributes[entity.Id.Index]; attrs.Activated = false; OnDeactivated?.Invoke(this, new EntityEventArgs() { Entity = entity }); }); entityCache.GetZombies().ForEach(entity => { OnDestroy?.Invoke(this, new EntityEventArgs() { Entity = entity }); entity.Destroy(); entityCache.RemoveAlive(entity); entityAttributes.Remove(entity.Id.Index); entityComponents.Remove(entity.Id.Index); entityIdPool.Remove(entity.Id); }); entityCache.ClearTemp(); }
protected void InvokeDeactivated() { OnDeactivated?.Invoke(); }
private void Deactivated(object sender, System.EventArgs args) { Input.Input.Instance?.OnGameDeactivated(); OnDeactivated?.Invoke(); }
public static void CallOnDeactivation(int id) { OnDeactivated?.Invoke(id); }
public void NotifyOnDeactivated() { OnDeactivated?.Invoke(this); }
/// <summary> /// Процедура деактивации меню/подменю /// </summary> public virtual void Deactivate() { IsActive = false; OnDeactivated?.Invoke(); }