From 5ceef5963f2bf498e288a079d352be2a1c8322f5 Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Mon, 30 Sep 2019 21:25:33 -0400 Subject: [PATCH] Revert "Initial push. Implemented basic walk button" --- Assets/Scripts/PlayerController.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index 7b48c1c..d183f21 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -16,13 +16,11 @@ public class PlayerController : MonoBehaviour public float gravity = 5.0f; private bool extraJump = true; - private float tempSpeed; private Vector3 moveDirection; void Start() { characterController = GetComponent(); - tempSpeed = speed; } void Update() @@ -34,7 +32,8 @@ public class PlayerController : MonoBehaviour if (extraJump == true) { moveDirection = moveDirection.normalized * speed; //Remove this line to make running diagonal the fastest standard run - } else { + } else + { moveDirection = (moveDirection.normalized * speed)/4; //Remove this line to make running diagonal the fastest standard run } @@ -45,15 +44,6 @@ public class PlayerController : MonoBehaviour extraJump = true; moveDirection.y = 0.0f; - if(Input.GetKey(KeyCode.LeftShift)) - { - moveDirection = (moveDirection.normalized * speed/2); - tempSpeed = speed/2; - } else { - moveDirection = moveDirection.normalized * speed; - tempSpeed = speed; - } - if (Input.GetButtonDown("Jump")) { moveDirection.y = jumpSpeed;