private void Scoring()
 {
     _currentSpeed = _rigidbody.velocity.magnitude;
     if (_scoreMultiplierCountDown > 0)
     {
         _scoreMultiplierCountDown -= Time.deltaTime;
     }
     if (_scoreMultiplierCountDown <= 0)
     {
         if (_rigidbody.velocity.magnitude > 1)
         {
             _scoreMultiplier += 0.1f;
         }
         GetBonusScore?.Invoke((int)(_scoreMultiplier * _currentSpeed));
         _scoreMultiplierCountDown = 1.0f;
     }
 }
Пример #2
0
 protected override void Interaction()
 {
     TriggerEvent();
     GetBonusScore?.Invoke(_score);
 }