private void Jump(Vector2 direction) { if (Mathf.Abs(direction.x) < Mathf.Abs(direction.y)) { if (direction.y > 0) { cubeClass.Jump(); } } }