How can I change this pile of code to a smaller one with less work if I want to change something?
function Update ()
{
if (Input.GetKey(KeyCode.W))
{
Move();
}
}
{
if (Input.GetKey(KeyCode.A))
{
Move();
}
}
{
if (Input.GetKey(KeyCode.S))
{
Move();
}
}
{
if (Input.GetKey(KeyCode.D))
{
Move();
}
}
I meanlike Input.GetKey (W,A,S,D)