if(Input.GetKey(upButton))
{
vertical = 1;
anim.Play("walk-up");
}
else if(Input.GetKey(downButton))
{
vertical = -1;
anim.Play("walk-down");
} else
{
vertical = 0;
}
if(Input.GetKey(leftButton))
{
horizontal = -1;
anim.Play("walk-left");
}
else if(Input.GetKey(rightButton))
{
horizontal = 1;
anim.Play("walk");
} else
{
horizontal = 0;
}