大修
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Lofelt.NiceVibrations
|
||||
|
||||
protected virtual void HitWall()
|
||||
{
|
||||
float amplitude = _rigidBody.velocity.magnitude / 100f;
|
||||
float amplitude = _rigidBody.linearVelocity.magnitude / 100f;
|
||||
HapticPatterns.PlayEmphasis(amplitude, 0.7f);
|
||||
EmphasisAudioSource.volume = amplitude;
|
||||
StartCoroutine(LogoShaker.Shake(0.2f));
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Lofelt.NiceVibrations
|
||||
|
||||
_direction = (collider.transform.position - this.transform.position).normalized;
|
||||
_direction.y = 1f;
|
||||
collider.attachedRigidbody.velocity = Vector2.zero;
|
||||
collider.attachedRigidbody.linearVelocity = Vector2.zero;
|
||||
collider.attachedRigidbody.AddForce(_direction * Force);
|
||||
TargetBall.HitPusher();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user