Code refactoring.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / Avatar.java
index 52d78b2..852dc97 100755 (executable)
@@ -70,7 +70,7 @@ public class Avatar implements ViewRenderListener {
     public boolean beforeRender(final ViewPanel viewPanel, final int millisecondsSinceLastFrame) {
 
         final Point3D locationBeforeUpdate = new Point3D(location);
-        translateAvatarLocation(millisecondsSinceLastFrame);
+        translateAvatarLocationBasedOnMovementVector(millisecondsSinceLastFrame);
         applyFrictionToUserMovement(millisecondsSinceLastFrame);
         return isFrameRepaintNeeded(locationBeforeUpdate);
     }
@@ -139,7 +139,7 @@ public class Avatar implements ViewRenderListener {
      *                                         Therefore we take frame rendering time into account when translating
      *                                         avatar between consecutive frames.
      */
-    private void translateAvatarLocation(int millisecondsPassedSinceLastFrame) {
+    private void translateAvatarLocationBasedOnMovementVector(int millisecondsPassedSinceLastFrame) {
         location.x -= (float) sin(getAngleXZ())
                 * getMovementVector().z * SPEED_MULTIPLIER
                 * millisecondsPassedSinceLastFrame;