diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index e3944c2..800a6a3 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -533,6 +533,8 @@ MonoBehaviour: FurnitureExplosionFun: 4 ShootingFunAmount: 0.2 DebugAdd10Fun: 0 + DebugSubtract10Fun: 0 + GodMode: 0 --- !u!114 &5620918083888341557 MonoBehaviour: m_ObjectHideFlags: 0 @@ -546,8 +548,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: BobbedTransform: {fileID: 4562179207922364650} - BobbingGravity: 1.5 - BobbingLaunchSpeed: 0.25 + BobbingGravity: 0.8 + BobbingLaunchSpeed: 0.1 BobbingDirection: {x: 0, y: 1} --- !u!1 &8489029732599905358 GameObject: diff --git a/Assets/Scripts/Effects/Bobbing.cs b/Assets/Scripts/Effects/Bobbing.cs index 8b5d818..584d9eb 100644 --- a/Assets/Scripts/Effects/Bobbing.cs +++ b/Assets/Scripts/Effects/Bobbing.cs @@ -6,6 +6,8 @@ public class Bobbing : MonoBehaviour { public Transform BobbedTransform; + [Range(0, 1)] + public float BobbingMultiplier = 1; public float BobbingGravity = 0.5f; public float BobbingLaunchSpeed = 5f; public Vector2 BobbingDirection = new Vector2(0, 1); @@ -15,13 +17,13 @@ public class Bobbing : MonoBehaviour { private float CurrentBobbingState = 0; void Update() { - BobbingSpeed -= BobbingGravity / 10 * Time.deltaTime; + BobbingSpeed -= (BobbingGravity / 10 * Time.deltaTime); if (CurrentBobbingState <= 0) { - BobbingSpeed = BobbingLaunchSpeed / 10; + BobbingSpeed = (BobbingLaunchSpeed / 10); } CurrentBobbingState += BobbingSpeed; - BobbedTransform.localPosition = BobbingDirection * CurrentBobbingState; + BobbedTransform.localPosition = BobbingDirection * CurrentBobbingState * BobbingMultiplier; } }