Created
September 19, 2011 23:18
-
-
Save jwoertink/1227877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Unnecessary code removed */ | |
package jme3test.helloworld; | |
import com.jme3.app.SimpleApplication; | |
import com.jme3.input.controls.ActionListener; | |
public class HelloInput extends SimpleApplication { | |
public static void main(String[] args) { | |
HelloInput app = new HelloInput(); | |
} | |
private void initKeys() { | |
inputManager.addListener(actionListener, new String[]{"Pause"}); | |
} | |
private ActionListener actionListener = new ActionListener() { | |
public void onAction(String name, boolean keyPressed, float tpf) { | |
if (name.equals("Pause") && !keyPressed) { | |
isRunning = !isRunning; | |
} | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment