public void SetSpeed(Point speed) { Speed[0] = speed.X; Speed[1] = speed.Y; SpeedChanged?.Invoke(this, EventArgs.Empty); Changed?.Invoke(this, EventArgs.Empty); }
public void ChangeSpeed(double speed) { MIDITime = GetTime(); Time = DateTime.UtcNow; Speed = speed; SpeedChanged?.Invoke(); }
public virtual void EditSpeed(int value) { SpeedMax = value; //прошивка двигателя позволяет изменять максимальную скорость var args = new SpeedChangedEventArgs(); args.NewMaxSpeed = value; SpeedChanged?.Invoke(this, args); }
public void Deceleration(float speedSlow, float attackDelaySlow) { _speed -= speedSlow; SpeedChanged?.Invoke(_speed); _attackDelay += attackDelaySlow; if (_attackDelay < 1) { _attackDelay = 1; } AttackDelayChanged?.Invoke(_attackDelay); }
private void InitEvents() { Closing += delegate { ViewClosing?.Invoke(); }; numericInterval.ValueChanged += delegate { IntervalChanged?.Invoke((uint)numericInterval.Value); }; checkRepeat.CheckedChanged += delegate { RepeatChanged?.Invoke(checkRepeat.Checked); }; checkRandom.CheckedChanged += delegate { RandomChanged?.Invoke(checkRandom.Checked); }; trackSpeed.ValueChanged += delegate { SpeedChanged?.Invoke(trackSpeed.Value); UpdateLabelSpeed(); }; trackVolume.ValueChanged += delegate { VolumeChanged?.Invoke(trackVolume.Value); UpdateLabelVolume(); }; comboVoice.SelectedValueChanged += delegate { VoiceChanged?.Invoke(comboVoice.SelectedItem?.ToString()); }; trackTimbre.ValueChanged += delegate { TimbreChanged?.Invoke(trackTimbre.Value); UpdateLabelTimbre(); }; }
/// <summary> /// Called when a navigation value is being notified /// </summary> /// <param name="characteristic">Characteristic which notified the value</param> /// <param name="value">New characteristic value</param> private void OnNavigationNotification(BleGattCharacteristic characteristic, BleValue value) { if (characteristic.Guid == SpeedGuid) { SpeedChanged?.Invoke(value.ToUInt16()); } else if (characteristic.Guid == LatitudeGuid) { LatitudeChanged?.Invoke(value.ToFloat64()); } else if (characteristic.Guid == LongitudeGuid) { LongitudeChanged?.Invoke(value.ToFloat64()); } else if (characteristic.Guid == TrackAngleGuid) { TrackAngleChanged?.Invoke(value.ToUInt16()); } else { } }
private void OnSpeedChanged(int value) => SpeedChanged?.Invoke(this, new IntEventArgs(value));
protected void OnSpeedChanged() { SpeedChanged?.Invoke(this, EventArgs.Empty); }
private void IncreaseSpeed() { Speed = _gameConfig.PlayerCharacterSettings.StartSpeed + Mathf.Sqrt(_gameConfig.PlayerCharacterSettings.Acceleration * Time.timeSinceLevelLoad); SpeedChanged?.Invoke(Speed); }
protected virtual void OnSpeedChanged(EventArgs e) { SpeedChanged?.Invoke(this, e); }
protected virtual void OnSpeedChanged(int newSpeed) { SpeedChanged?.Invoke(this, new SpeedChangedArgs(newSpeed)); }
public void SetSpeed(int speed) { Speed = speed; SpeedChanged?.Invoke(); }
protected virtual void OnSpeedChanged(int speed) { SpeedChanged?.Invoke(this, speed); }
public void AddSpeed(int delta) { speed += delta; SpeedChanged?.Invoke(speed); }