internal void Update(GameTime gameTime) { if (_slideState == SlideState.TransitionOn) { _pos += (_transitionDir * 20); if (_pos == 0) { _slideState = SlideState.Active; } OnActivate?.Invoke(this, null); } else if (_slideState == SlideState.TransitionOff) { _pos += (_transitionDir * 20); if (Math.Abs(_pos) == BOUNDARY) { _slideState = SlideState.Inactive; } OnDeactivate?.Invoke(this, null); } else if (_slideState == SlideState.Active) { foreach (var r in _renderers) { r.Update(gameTime); } } }
/// <summary> /// Deactivates the Quantum Console. /// </summary> public void Deactivate() { IsActive = false; _containerRect.gameObject.SetActive(false); OnDeactivate?.Invoke(); }
public void Deactivate() { timer.Tick -= Timer_Tick; timer.Stop(); lbltimer.Stop(); OnDeactivate?.Invoke(this, new EventArgs()); _IsActive = false; }
public void DeactivateTutorial() { TutorialObject _oldObject = _activeTutorial; _activeTutorial = null; OnDeactivate?.Invoke(_oldObject); }
public void Deactivate() { _active = false; if (OnDeactivate != null) { OnDeactivate.Invoke(this); } }
protected void Exit(ColliderType collider) { bool wasActive = Active; inside.Remove(collider); OnExit.Invoke(collider); if (wasActive && !Active) { OnDeactivate.Invoke(collider); } }
private void DoDeactivate() { if (IsEnabled) { try { OnDeactivate?.Invoke(this, EventArgs.Empty); IsEnabled = true; } catch (Exception ex) { Logger.Error("Failed to deactivate component.", ex); } } }
public async Task <string> Work(int fuelTankVolume, WriterDelegate writerDelegate) { try { int time = 3000; var step = time * Volume / 1000; for (int i = 0; i < fuelTankVolume; i += step) { if (i == step) { OnActive?.Invoke(this, new EventArgs()); } await Task.Delay(time); writerDelegate($"{this.ToString()} Мощность = {Power} лс"); } OnDeactivate?.Invoke(this, new EventArgs()); return("ok"); } catch (Exception ex) { return(ex.Message); } }
public void Deactivate() { OnDeactivate?.Invoke(); }
protected void Deactivate() { Active = false; OnDeactivate?.Invoke(this); }
private void Deactivate() { OnDeactivate?.Invoke(this); }
public void DestroyBullet() { GameManager.Instance.LevelController.Bullets.Remove(this); OnDeactivate?.Invoke(this); }
protected void OnDeactivated(object sender, EventArgs e) { OnDeactivate?.Invoke(sender, e); _IsActive = false; }