diff game/Piece.java @ 10:4bacc98973f5

More work.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Jan 2011 01:54:28 +0200
parents a7751971c2a3
children b89ecc8d5557
line wrap: on
line diff
--- a/game/Piece.java	Sat Jan 29 00:30:00 2011 +0200
+++ b/game/Piece.java	Sat Jan 29 01:54:28 2011 +0200
@@ -92,8 +92,8 @@
         currRotation = currRotation + (dir ? -1 : 1);
         newAngle = (float) (currRotation * Math.PI) / 2.0f;
 
+        lerpRotation = new Interpolate(currAngle, newAngle, maxTime);
         rotationChanged = true;
-        lerpRotation = new Interpolate(currAngle, newAngle, maxTime);
     }
 
     public Point2D getPointCoords(float x, float y, float dim, int index)
@@ -158,7 +158,6 @@
         
         if (activeChanged)
         {
-            
         }
         
         throb = (time % 100) / 100.0f;
@@ -170,9 +169,6 @@
         tf.rotate(currAngle, x + dim / 2.0f, y + dim / 2.0f);
         g.transform(tf);
 
-        if (type == PieceType.ACTIVE)
-            System.out.print("angle = " + currAngle + "\n");
-
         switch (type) {
             case LOCKED:  g.setPaint(Color.green); break;
             case ACTIVE:  g.setPaint(Color.red); break;