private void UpdateVelocityBoosts(float deltaTime) { if (horizontalBoost == null) { return; } bool isValid = horizontalBoost.UpdateVelocity(deltaTime); if (!isValid) { horizontalBoost = null; } else { _currentVelocity += horizontalBoost.currentVelocity; } }
public void AddHoziontalVelocityBoost(HorizontalVelocityBoost boost) { horizontalBoost = boost; }