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; } }
protected override void Interaction() { TriggerEvent(); GetBonusScore?.Invoke(_score); }