Merge pull request #5 from gjcampbell777/walk_button
Initial Push. Implemented clean basic walk button
This commit is contained in:
@@ -44,6 +44,13 @@ public class PlayerController : MonoBehaviour
|
||||
extraJump = true;
|
||||
moveDirection.y = 0.0f;
|
||||
|
||||
if(Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
moveDirection = (moveDirection.normalized * speed/2);
|
||||
} else {
|
||||
moveDirection = moveDirection.normalized * speed;
|
||||
}
|
||||
|
||||
if (Input.GetButtonDown("Jump"))
|
||||
{
|
||||
moveDirection.y = jumpSpeed;
|
||||
|
||||
Reference in New Issue
Block a user