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
This commit is contained in:
parent
01d8f36a52
commit
97ccd701fe
@ -75,8 +75,8 @@ public class HelloInput extends SimpleApplication {
|
|||||||
inputManager.addMapping("Rotate", new KeyTrigger(KeyInput.KEY_SPACE), // spacebar!
|
inputManager.addMapping("Rotate", new KeyTrigger(KeyInput.KEY_SPACE), // spacebar!
|
||||||
new MouseButtonTrigger(MouseInput.BUTTON_LEFT) ); // left click!
|
new MouseButtonTrigger(MouseInput.BUTTON_LEFT) ); // left click!
|
||||||
/** Add the named mappings to the action listeners. */
|
/** Add the named mappings to the action listeners. */
|
||||||
inputManager.addListener(actionListener, new String[]{"Pause"});
|
inputManager.addListener(actionListener,"Pause");
|
||||||
inputManager.addListener(analogListener, new String[]{"Left", "Right", "Rotate"});
|
inputManager.addListener(analogListener,"Left", "Right", "Rotate");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Use this listener for KeyDown/KeyUp events */
|
/** Use this listener for KeyDown/KeyUp events */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user