Skip to content

Commit

Permalink
Fixed warning in sample game
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Aug 27, 2018
1 parent c8b1715 commit d7eaced
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ void UpdateThruster()
{
var speed = (_ship.Position - _lastPosition).magnitude / Time.deltaTime;
var speedPx = Mathf.Clamp(speed / _settings.speedForMaxEmisssion, 0.0f, 1.0f);

#if UNITY_2018
_ship.ParticleEmitter.emissionRate = _settings.maxEmission * speedPx;
var emission = _ship.ParticleEmitter.emission;
emission.rateOverTime = _settings.maxEmission * speedPx;
#else
_ship.ParticleEmitter.maxEmission = _settings.maxEmission * speedPx;
#endif
Expand Down

0 comments on commit d7eaced

Please sign in to comment.