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
3.0
rem..om 12 years ago
parent 01d8f36a52
commit 97ccd701fe
  1. 4
      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 */

Loading…
Cancel
Save