static final int VERTEX_SIZE = 2 + 1 + 2;\r
static final int SPRITE_SIZE = 4 * VERTEX_SIZE;\r
\r
- final float[] vertices = new float[20];\r
+ final float[] vertices = new float[SPRITE_SIZE];\r
private final Color color = new Color(1, 1, 1, 1);\r
private float x, y;\r
float width, height;\r
if (sprite == null) throw new IllegalArgumentException("sprite cannot be null.");\r
System.arraycopy(sprite.vertices, 0, vertices, 0, SPRITE_SIZE);\r
texture = sprite.texture;\r
+ u = sprite.u;\r
+ v = sprite.v;\r
+ u2 = sprite.u2;\r
+ v2 = sprite.v2;\r
x = sprite.x;\r
y = sprite.y;\r
width = sprite.width;\r
rotation = sprite.rotation;\r
scaleX = sprite.scaleX;\r
scaleY = sprite.scaleY;\r
+ color.set(sprite.color);\r
dirty = sprite.dirty;\r
}\r
\r