diff --git a/Assets/Scripts/PlayerMovement.cs b/Assets/Scripts/PlayerMovement.cs index cbf7335f99373e1b40adb11962c70d7877d92d10..61927bfb6935685008ed77db33b0a7f4143cf794 100644 --- a/Assets/Scripts/PlayerMovement.cs +++ b/Assets/Scripts/PlayerMovement.cs @@ -86,11 +86,14 @@ public class PlayerMovement : MonoBehaviour Attack(); } } - /* + if (Input.GetKey(inputLeft) && !isOver) { - transform.Rotate(0, - turnSpeed * Time.deltaTime, 0); - //animator.SetBool("Walk", true); + transform.Translate(Vector3.left * (walkSpeed / 2) * Time.deltaTime); + if (!isAttacking) + { + animator.SetBool("Walk", true); + } if (Input.GetKeyDown(KeyCode.Mouse0)) { @@ -100,14 +103,17 @@ public class PlayerMovement : MonoBehaviour if (Input.GetKey(inputRight) && !isOver) { - transform.Rotate(0, turnSpeed * Time.deltaTime, 0); - //animator.SetBool("Walk", true); + transform.Translate(Vector3.right * (walkSpeed / 2) * Time.deltaTime); + if (!isAttacking) + { + animator.SetBool("Walk", true); + } if (Input.GetKeyDown(KeyCode.Mouse0)) { Attack(); } - }*/ + } float verticalOffset = Input.GetAxis("Mouse X") * 0.6f; transform.Rotate(0, verticalOffset * turnSpeed * Time.deltaTime, 0);