public void setRegion (int x, int y, int width, int height) {\r
float invTexWidth = 1f / texture.getWidth();\r
float invTexHeight = 1f / texture.getHeight();\r
- this.u = x * invTexWidth;\r
- this.v = y * invTexHeight;\r
- this.u2 = (x + width) * invTexWidth;\r
- this.v2 = (y + height) * invTexHeight;\r
+ setRegion(x * invTexWidth, y * invTexHeight, (x + width) * invTexWidth, (y + height) * invTexHeight);\r
regionWidth = Math.abs(width);\r
regionHeight = Math.abs(height);\r
}\r