public void updateAnimation() { // if (isIdle()) // { if (values.getAttack() == PlayerValues.inputState.HitMain) { if (!isRight() && isUp()) { current_state = 1; } else if (!isRight() && !isUp()) { current_state = 2; } else if (isRight() && !isUp()) { current_state = 3; } else if (isRight() && isUp()) { current_state = 4; } anim.SetInteger("current_state", current_state); } // } }