public void Finish(float fadeTime) { if (_isFinishing) { return; } _isFinishing = true; if (fadeTime == 0) { GameObject.Destroy(gameObject); } else { var vol = _volume.Value; _volume.SetAcceleration(float.MaxValue); _volume.SetDeacceleration(float.MaxValue); _volume.SetMaximumVelocity(vol / fadeTime); _volume.OnValueReach.Register(() => GameObject.Destroy(gameObject)); _volume.SetDesire(0); } }
public void SetAcceleration(float acc) { _animator.SetAcceleration(acc); }