Refactoring.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / humaninput / WorldNavigationTracker.java
index 34fd37e..cc99c42 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * Sixth - System for data storage, computation, exploration and interaction.
- * Copyright ©2012-2016, 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
  * or later as published by the Free Software Foundation.
+ *
  */
 
 package eu.svjatoslav.sixth.e3d.gui.humaninput;
@@ -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();
     }