Sorry for the late reply! Here is my suggestion taking from the Gamedev.tv 2D Unity Course.
For my game I used a Velocity of the Rigidbody and multiplied it with the input of the keyboard. Afterward used a Math.f Method to make sure that the Velocity will always round out to a Whole Number. Here is the example code.
Vector2 moveInput;
Rigidbody2D myRigidBody;
[SerializeField] float runSpeed = 10f;
Vector2 playerVelocity = new Vector2 (moveInput.x * runSpeed, myRigidBody.velocity.y);
myRigidBody.velocity = playerVelocity;
bool playerHasHorizontalSpeed = Mathf.Abs(myRigidBody.velocity.x) > Mathf.Epsilon;
Hope that helps a little. :)