Exemplo n.º 1
0
 public void SetSpeed(Point speed)
 {
     Speed[0] = speed.X;
     Speed[1] = speed.Y;
     SpeedChanged?.Invoke(this, EventArgs.Empty);
     Changed?.Invoke(this, EventArgs.Empty);
 }
Exemplo n.º 2
0
 public void ChangeSpeed(double speed)
 {
     MIDITime = GetTime();
     Time     = DateTime.UtcNow;
     Speed    = speed;
     SpeedChanged?.Invoke();
 }
Exemplo n.º 3
0
        public virtual void EditSpeed(int value)
        {
            SpeedMax = value; //прошивка двигателя позволяет изменять максимальную скорость
            var args = new SpeedChangedEventArgs();

            args.NewMaxSpeed = value;
            SpeedChanged?.Invoke(this, args);
        }
Exemplo n.º 4
0
 public void Deceleration(float speedSlow, float attackDelaySlow)
 {
     _speed -= speedSlow;
     SpeedChanged?.Invoke(_speed);
     _attackDelay += attackDelaySlow;
     if (_attackDelay < 1)
     {
         _attackDelay = 1;
     }
     AttackDelayChanged?.Invoke(_attackDelay);
 }
Exemplo n.º 5
0
        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();
            };
        }
Exemplo n.º 6
0
 /// <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
     {
     }
 }
Exemplo n.º 7
0
 private void OnSpeedChanged(int value) => SpeedChanged?.Invoke(this, new IntEventArgs(value));
Exemplo n.º 8
0
 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);
 }
Exemplo n.º 10
0
 protected virtual void OnSpeedChanged(EventArgs e)
 {
     SpeedChanged?.Invoke(this, e);
 }
Exemplo n.º 11
0
 protected virtual void OnSpeedChanged(int newSpeed)
 {
     SpeedChanged?.Invoke(this, new SpeedChangedArgs(newSpeed));
 }
Exemplo n.º 12
0
 public void SetSpeed(int speed)
 {
     Speed = speed;
     SpeedChanged?.Invoke();
 }
Exemplo n.º 13
0
 protected virtual void OnSpeedChanged(int speed)
 {
     SpeedChanged?.Invoke(this, speed);
 }
Exemplo n.º 14
0
    public void AddSpeed(int delta)
    {
        speed += delta;

        SpeedChanged?.Invoke(speed);
    }