Răsfoiți Sursa

Used var-args to register input listeners to the inpurManager in HelloInput instead of creating a string arrays. Also updated the wiki

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10715 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 12 ani în urmă
părinte
comite
97ccd701fe
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      engine/src/test/jme3test/helloworld/HelloInput.java

+ 2 - 2
engine/src/test/jme3test/helloworld/HelloInput.java

@@ -75,8 +75,8 @@ public class HelloInput extends SimpleApplication {
     inputManager.addMapping("Rotate", new KeyTrigger(KeyInput.KEY_SPACE), // spacebar!
                                       new MouseButtonTrigger(MouseInput.BUTTON_LEFT) );        // left click!
     /** Add the named mappings to the action listeners. */
-    inputManager.addListener(actionListener, new String[]{"Pause"});
-    inputManager.addListener(analogListener, new String[]{"Left", "Right", "Rotate"});
+    inputManager.addListener(actionListener,"Pause");
+    inputManager.addListener(analogListener,"Left", "Right", "Rotate");
   }
 
   /** Use this listener for KeyDown/KeyUp events */