diff --git a/Assets/Scripts/Effects/Bobbing.cs b/Assets/Scripts/Effects/Bobbing.cs index b2a2b3d..719485d 100644 --- a/Assets/Scripts/Effects/Bobbing.cs +++ b/Assets/Scripts/Effects/Bobbing.cs @@ -27,10 +27,10 @@ namespace Saltosion.OneWeapon.Effects { if (CurrentBobbingState <= 0) { BobbingSpeed = (BobbingLaunchSpeed / 10); } - CurrentBobbingState += BobbingSpeed * BobbingMultiplier; + CurrentBobbingState += BobbingSpeed * BobbingMultiplier * Time.deltaTime * 100.0f; BobbedTransform.localPosition = BobbingDirection * CurrentBobbingState * BobbingMultiplier; } } -} \ No newline at end of file +} diff --git a/Assets/Scripts/Effects/CameraFX.cs b/Assets/Scripts/Effects/CameraFX.cs index 697953f..5732098 100644 --- a/Assets/Scripts/Effects/CameraFX.cs +++ b/Assets/Scripts/Effects/CameraFX.cs @@ -25,6 +25,7 @@ namespace Saltosion.OneWeapon.Effects { private void Update() { if (TimeStopCooldown > 0) { TimeStopCooldown -= Time.deltaTime / Time.timeScale; + if (TimeStopCooldown <= 0) { Time.timeScale = 1.0f; } @@ -42,7 +43,12 @@ namespace Saltosion.OneWeapon.Effects { } public void StopFor(float seconds) { - Time.timeScale = 0.05f; + Time.timeScale = 0.01f; + TimeStopCooldown = seconds; + } + + public void SlowMotion(float timeScale, float seconds) { + Time.timeScale = timeScale; TimeStopCooldown = seconds; }