Refactoring.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / humaninput / WorldNavigationTracker.java
index 8c37c52..cc99c42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
@@ -18,8 +18,8 @@ import java.awt.event.KeyEvent;
 public class WorldNavigationTracker implements UserInputHandler {
 
     @Override
-    public boolean beforeViewUpdate(final ViewContext viewContext,
-                                    final int millisecondsSinceLastFrame) {
+    public boolean beforeRender(final ViewContext viewContext,
+                                final int millisecondsSinceLastFrame) {
 
         trackKeys(millisecondsSinceLastFrame, viewContext);
         return false;
@@ -56,16 +56,16 @@ public class WorldNavigationTracker implements UserInputHandler {
                 * (1 + (avatar.getMovementSpeed() / 10));
 
         if (inputTracker.isKeyPressed(KeyboardHelper.UP))
-            avatar.getMovementDirection().z += actualAcceleration;
+            avatar.getMovementVector().z += actualAcceleration;
 
         if (inputTracker.isKeyPressed(KeyboardHelper.DOWN))
-            avatar.getMovementDirection().z -= actualAcceleration;
+            avatar.getMovementVector().z -= actualAcceleration;
 
         if (inputTracker.isKeyPressed(KeyboardHelper.RIGHT))
-            avatar.getMovementDirection().x += actualAcceleration;
+            avatar.getMovementVector().x += actualAcceleration;
 
         if (inputTracker.isKeyPressed(KeyboardHelper.LEFT))
-            avatar.getMovementDirection().x -= actualAcceleration;
+            avatar.getMovementVector().x -= actualAcceleration;
 
         avatar.enforceSpeedLimit();
     }