Код: Выделить всё
if (Input.GetKeyDown(KeyCode.X) && Input.GetKey(KeyCode.W)
{
Attackpressed = true;
}
if (Attackpressed)
{
Attackpressed = false;
if (!isAttacking)
{
isAttacking = true;
}
if (IsGrounded())
{
PlayAnimation(Attackup);
}
Invoke("AnimationStop",0.3f);
{
PlayAnimation(Attackupaway);
}
Invoke("AnimationStop",0.3f);
}
Подробнее здесь: https://stackoverflow.com/questions/788 ... ding-w-key