}\r
\r
// Note the region is copied.\r
- /** Creates a sprite based on a specific TextureRegion, the new sprite's region is a copy of\r
- * the parameter region - altering one does not affect the other */\r
+ /** Creates a sprite based on a specific TextureRegion, the new sprite's region is a copy of the parameter region - altering one\r
+ * does not affect the other */\r
public Sprite (TextureRegion region) {\r
setRegion(region);\r
setColor(1, 1, 1, 1);\r
vertices[X4] += xAmount;\r
vertices[Y4] += yAmount;\r
}\r
- \r
+\r
/** Sets the color used to tint this sprite. Default is {@link Color#WHITE}. */\r
public void setColor (Color tint) {\r
float color = tint.toFloatBits();\r
vertices[C3] = color;\r
vertices[C4] = color;\r
}\r
- \r
+\r
/** @see #setColor(Color) */\r
public void setColor (float r, float g, float b, float a) {\r
int intBits = ((int)(255 * a) << 24) | ((int)(255 * b) << 16) | ((int)(255 * g) << 8) | ((int)(255 * r));\r
dirty = true;\r
}\r
\r
- /** Sets the rotation of the sprite in degrees.\r
- * Rotation is centered on the origin set in {@link #setOrigin(float, float)} */\r
+ /** Sets the rotation of the sprite in degrees. Rotation is centered on the origin set in {@link #setOrigin(float, float)} */\r
public void setRotation (float degrees) {\r
this.rotation = degrees;\r
dirty = true;\r
}\r
- \r
- /**\r
- * @return the rotation of the sprite in degrees\r
- */\r
- public float getRotation() {\r
+\r
+ /** @return the rotation of the sprite in degrees */\r
+ public float getRotation () {\r
return rotation;\r
}\r
\r
- /** Sets the sprite's rotation in degrees relative to the current rotation.\r
- ** Rotation is centered on the origin set in {@link #setOrigin(float, float)} */\r
+ /** Sets the sprite's rotation in degrees relative to the current rotation. Rotation is centered on the origin set in\r
+ * {@link #setOrigin(float, float)} */\r
public void rotate (float degrees) {\r
rotation += degrees;\r
dirty = true;\r
}\r
}\r
\r
- /** Sets the sprite's scale for both X and Y uniformly.\r
- * The sprite scales out from the origin.\r
- * This will not affect the values returned by {@link #getWidth()} and {@link #getHeight()}*/\r
+ /** Sets the sprite's scale for both X and Y uniformly. The sprite scales out from the origin. This will not affect the values\r
+ * returned by {@link #getWidth()} and {@link #getHeight()} */\r
public void setScale (float scaleXY) {\r
this.scaleX = scaleXY;\r
this.scaleY = scaleXY;\r
dirty = true;\r
}\r
\r
- /** Sets the sprite's scale for both X and Y.\r
- * The sprite scales out from the origin.\r
- * This will not affect the values returned by {@link #getWidth()} and {@link #getHeight()}*/\r
+ /** Sets the sprite's scale for both X and Y. The sprite scales out from the origin. This will not affect the values returned by\r
+ * {@link #getWidth()} and {@link #getHeight()} */\r
public void setScale (float scaleX, float scaleY) {\r
this.scaleX = scaleX;\r
this.scaleY = scaleY;\r
dirty = true;\r
}\r
\r
- /** Sets the sprite's scale relative to the current scale.\r
- * for example: original scale 2 -> sprite.scale(4) -> final scale 6.\r
- * The sprite scales out from the origin.\r
- * This will not affect the values returned by {@link #getWidth()} and {@link #getHeight()}*/\r
+ /** Sets the sprite's scale relative to the current scale. for example: original scale 2 -> sprite.scale(4) -> final scale 6.\r
+ * The sprite scales out from the origin. This will not affect the values returned by {@link #getWidth()} and\r
+ * {@link #getHeight()} */\r
public void scale (float amount) {\r
this.scaleX += amount;\r
this.scaleY += amount;\r
return height;\r
}\r
\r
- /** The origin influences {@link #setPosition(float, float)},\r
- * {@link #setRotation(float)} and the expansion direction of scaling {@link #setScale(float, float)}\r
- * */\r
+ /** The origin influences {@link #setPosition(float, float)}, {@link #setRotation(float)} and the expansion direction of scaling\r
+ * {@link #setScale(float, float)} */\r
public float getOriginX () {\r
return originX;\r
}\r
\r
- /** The origin influences {@link #setPosition(float, float)},\r
- * {@link #setRotation(float)} and the expansion direction of scaling {@link #setScale(float, float)}\r
- * */\r
+ /** The origin influences {@link #setPosition(float, float)}, {@link #setRotation(float)} and the expansion direction of scaling\r
+ * {@link #setScale(float, float)} */\r
public float getOriginY () {\r
return originY;\r
}\r
\r
- /** @return sprite rotation in degrees\r
- public float getRotation () {\r
- return rotation;\r
- }\r
-\r
/** X scale of the sprite, independent of size set by {@link #setSize(float, float)} */\r
public float getScaleX () {\r
return scaleX;\r