OSDN Git Service

Formatted, fixed getRotation being commented out.
authorNathanSweet <nathan.sweet@gmail.com>
Fri, 13 Sep 2013 12:19:47 +0000 (14:19 +0200)
committerNathanSweet <nathan.sweet@gmail.com>
Fri, 13 Sep 2013 12:19:47 +0000 (14:19 +0200)
e10d5cc09d113ec71c1a67af84b8a273f073272d

gdx/src/com/badlogic/gdx/graphics/g2d/Sprite.java

index 19ca53e..3d09132 100644 (file)
@@ -76,8 +76,8 @@ public class Sprite extends TextureRegion {
        }\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
@@ -248,7 +248,7 @@ public class Sprite extends TextureRegion {
                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
@@ -258,7 +258,7 @@ public class Sprite extends TextureRegion {
                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
@@ -287,22 +287,19 @@ public class Sprite extends TextureRegion {
                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
@@ -340,28 +337,25 @@ public class Sprite extends TextureRegion {
                }\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
@@ -506,25 +500,18 @@ public class Sprite extends TextureRegion {
                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