diff --git a/Assets/Scripts/Bouncepad.cs b/Assets/Scripts/Bouncepad.cs index 12d9ad6..acf256d 100644 --- a/Assets/Scripts/Bouncepad.cs +++ b/Assets/Scripts/Bouncepad.cs @@ -15,8 +15,6 @@ public class Bouncepad : MonoBehaviour [SerializeField] public float bounceForce = 20f; - [SerializeField] - public float verticalMultiplier = 1.0f; public Facing Direction() { diff --git a/Assets/Scripts/PlayerBehavior.cs b/Assets/Scripts/PlayerBehavior.cs index 7f3b5d4..edee8eb 100644 --- a/Assets/Scripts/PlayerBehavior.cs +++ b/Assets/Scripts/PlayerBehavior.cs @@ -296,25 +296,20 @@ public class PlayerBehavior : MonoBehaviour { // Assign the player's velocity to zero so that the player can // bounce on the same jump pad - // this.playerController.RB.velocity = new Vector2( - // this.playerController.RB.velocity.x, - // 0 - // ); - this.playerController.RB.velocity = Vector2.zero; + this.playerController.RB.velocity = new Vector2( + this.playerController.RB.velocity.x, + 0 + ); Bouncepad pad = col.GetComponent(); switch (pad.Direction()) { case Bouncepad.Facing.Left: this.playerController.RB.AddForce( - new Vector2(-pad.bounceForce, pad.verticalMultiplier * pad.bounceForce), + new Vector2(-pad.bounceForce, pad.bounceForce), ForceMode2D.Impulse ); break; case Bouncepad.Facing.Right: - this.playerController.RB.AddForce( - new Vector2(pad.bounceForce, pad.verticalMultiplier * pad.bounceForce), - ForceMode2D.Impulse - ); break; } }